-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
feat: Creat waiting-to-merge action #1506
Conversation
Want to review this pull request? Take a look at this documentation for a step by step guide! From your project repository, check out a new branch and test the changes.
|
Prevents merging when a `waiting to merge` label is applied
Looked at it, but I need to read up more on yaml files. |
@evanyang1 code is adapted from here. This additional action will only trigger when the conditional is met: if: ${{ contains(github.event.*.labels.*.name, 'waiting to merge') }} From there the workflow will fail with exit code 1, preventing the PR from being merged. |
@evanyang1 The github action docs are your friend here The For this PR the environment is ubuntu and the steps run a basic bash script that logs some explanatory information and intentionally fails by exiting with a status code of 1 which is a standard error code for UNIX systems The kicker is that just making the github aciton fail doesn't prevent a merge. You also have to add the workflow to the required checks through the settings tab of this repository which it looks like has already been done |
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.
@spiteless I took the liberty of adding the waiting to merge
label for you and it looks good 👍
@spiteless did you add the workflow to the status checks for the I've never seen a failing check not prevent a merge before |
@MattPereira No, I haven’t taken any further steps except this new action. I expected to have some trial and error that needs to be resolved since I don't know how I'd test these locally. |
@spiteless You could test on your fork by adding the appropriate branch protection rule to the fork For the official VRMS repository someone will need access to the "Settings" tab in order to add the rule that will actually block merge when the workflow from this PR fails |
@MattPereira Pretty sure it's working now but please double check. I just tested here: |
Prevents merging when a
waiting to merge
label is appliedFixes #1505
What changes did you make and why did you make them ?
waiting to merge
label is applied