-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enhance(build)!: add fork field for OIDC #1221
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1221 +/- ##
==========================================
+ Coverage 56.87% 56.89% +0.01%
==========================================
Files 599 599
Lines 32869 32886 +17
==========================================
+ Hits 18695 18709 +14
- Misses 13538 13541 +3
Partials 636 636
|
@@ -191,6 +192,7 @@ func (b *Build) Environment(workspace, channel string) map[string]string { | |||
envs["VELA_PULL_REQUEST"] = number | |||
envs["VELA_PULL_REQUEST_SOURCE"] = b.GetHeadRef() | |||
envs["VELA_PULL_REQUEST_TARGET"] = b.GetBaseRef() | |||
envs["VELA_PULL_REQUEST_FORK"] = ToString(b.GetFork()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this info attached to pull requests only? or can we do VELA_REPO_FORK
and report it on non-PR events too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the only event that can be triggered on the main repo by content pushed to a fork of that repo is via the PR event. GitHub definitely has metadata about if the repo is a fork, but the only time that really matters is when it's attempting to trigger a build on the parent repo right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ohhh i understand what you mean, yeah i get it. sweet
Extra context from OIDC proposal: go-vela/community#976 (comment)
This will allow for stricter policies when considering PR builds and their ability to leverage OIDC.