-
Notifications
You must be signed in to change notification settings - Fork 35
addressing issue #223 #252
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
base: main
Are you sure you want to change the base?
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.
Pull Request Overview
This PR adds permission checks and status validation to GitHub Actions workflows to handle fork PR restrictions. The changes ensure that workflows properly fail when not authorized to run on fork PRs and prevent false success statuses when tests are skipped due to permission issues.
- Adds explicit "Not Allowed to Run" steps that fail with clear error messages when workflows lack permission
- Updates failure condition logic to respect the
should_runcheck before evaluating test results - Introduces a new
check_pr_statusjob to properly validate PR status and workflow completion
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.github/workflows/test_terraform.yml |
Adds permission check step and updates failure condition to respect should_run output |
.github/workflows/check_pr.yml |
Adds new check_pr_status job with permission validation and status checking logic |
mluker
left a comment
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.
π assuming the GHCP suggestions are addressed.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
|
/allow |
β Test Approved@PabloZaiden has approved running terraform tests for commit Approval Details:
Important: If new commits are pushed, tests will need to be re-approved. |
|
/allow |
β Test Approved@PabloZaiden has approved running terraform tests for commit Approval Details:
Important: If new commits are pushed, tests will need to be re-approved. |
|
@polatengin, the "/allow" command doesn't seem to be working properly. It's not triggering the expected workflows, or those workflows are not detecting the approval |
|
/allow |
β Test Approved@PabloZaiden has approved running terraform tests for commit Approval Details:
Important: If new commits are pushed, tests will need to be re-approved. |
π₯ Pull Request
π Related Issue(s)
Close #223
β What are you trying to address
When someone from outside the organization (a "fork PR") submits a pull request, we have a security measure where a maintainer must approve it by typing
/allowbefore our tests will run.If a maintainer forgot to approve it, the PR would still show a green checkmark β and could be merged - even though NO TESTS RAN AT ALL!
This is dangerous because untested code could get into our main branch.
β¨ Description of new changes
We added a new check at the end of our workflows that says:
"If we were NOT allowed to run, that's a FAILURE, not a success!"
Now the workflow behaves like this:
/allowβοΈ Checklist