-
Notifications
You must be signed in to change notification settings - Fork 119
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
cmd: project option to disable passing variables to PR from forked repo #198
Conversation
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.
@camandel Thanks for your PR. Can you please also add some integration tests to check this new feature?
a9df525
to
b5b3e3d
Compare
Integration tests added |
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.
@camandel The integration tests looks great and made me remember that in #38 I haven't detailed that we should probably do this only on forked pull requests since pull requests from the same repos means that the users have access to the main repo.
So the option should be called something like PassVarsToForkedPR
and we should check that the source and destination repositories are not the same. This will require extending the webhooks parsing the retrieve the base and head repositories and return in WebhookData
something like a PRFromSameRepo
bool.
b5b3e3d
to
69fd8a4
Compare
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.
@camandel Just some small nits and then it LGTM!
69fd8a4
to
182eb14
Compare
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.
@camandel LGTM! Thanks! Merging.
cmd: project option to disable passing variables to PR from forked repo
cmd: project option to disable passing variables to PR from forked repo
Add boolean parameter to choose if pass variables to runs even when triggered by PRs (option disabled by default):
agola project [create|update] --pass-vars-to-pr=true <...>
Fixes #38