-
Notifications
You must be signed in to change notification settings - Fork 11
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
OSOE-517: Add merge queue support for verifying GitHub Action expected refs #292
Conversation
I approved the PR but we got this error here: https://github.com/Lombiq/GitHub-Actions/actions/runs/7092583727/job/19304192097?pr=292#step:11:27 |
Ok, I'll take a look - for some reason the head and base refs are both empty which is unexpected. |
I fixed the above error. In consolidating the Verify GitHub Actions Items Match Expected Ref step, I overlooked that on a |
Okay, I approved it, now I will try to merge it and it should fail, because I haven't changed the action branches'. |
@davidpuplava Shouldn't this also prevent the merge? (BTW I reverted the merge for now. You can open another PR with the same branch.) |
@DemeSzabolcs I think this might be a settings issue because I don't see a workflow action run triggered by the add to the merge queue. Under Can you check and confirm the branch protection rule for The workflow run where the validate GHA refs failed (https://github.com/Lombiq/GitHub-Actions/actions/runs/7151812876) is from the push to the |
Thank you, I see! I can't check that. @BenedekFarkas, or @Piedone could you please check it?
|
Thanks, I've just set this up for this repo. Please confirm that this means that after approving the PR, |
@davidpuplava Please open another PR, with the same changes as this one and we can test it. |
Adds support for merge queues to run the
validate-this-gha-refs
workflow when a pull request is added to the merge group, if the repository is configured for it.Adds a
skipReviewApproval
flag to theDetermine Expected Ref for GitHub Actions Files
step of thevalidate-this-gha-refs
workflow that changes the default behavior of expecting the base branch ref (e.g.@dev
) when the Pull Request is approved (using GitHub's pull request review feature). This allows additional commits on the PR branch after review approval but before adding the PR to the merge queue.Here is a reminder on how the
validate-this-gha-refs
currently behaves:@issue/[OSOE-517](https://lombiq.atlassian.net/browse/OSOE-517)
.@dev
so that the developer or reviewer can make sure the refs are changed back todev
prior to merging the pull request.Here is how this PR changes the
validate-this-gha-refs
behavior:@issue/[OSOE-517](https://lombiq.atlassian.net/browse/OSOE-517)
.skipReviewApproval
flag is set to False, will the behavior be the same as above. After PR approval, the expected refs are the base branch e.g.@dev
so that the developer or reviewer can make sure the refs are changed back todev
prior to merging the pull request.skipReviewApproval
flag is set to True to align with how PRs can get a PR Review approval but receive additional commits before wanting to enforce the base branch refs, e.g.@dev
.@dev
) happens after the PR is added to the merge queue (i.e. when the "Merge When Ready" button is clicked. NOTE I believe for this to work, you have to configure the merge queue to run thevalidate-this-gha-refs
workflow as a status check.This PR essentially changes the "signal" for approval from PR Review Approval to adding it to the Merge Queue (clicking the Merge When Ready button).