Repository navigation
NO-ISSUE: Let ci-duty bypass branch protections with its role - #280
Merged
Merged
Conversation
The force-merge checkbox of a pull request ("Merge without waiting for
requirements to be met") is offered only to someone who can bypass every
rule on the branch. ci-duty is already a bypass actor of the rulesets and
of the review requirements, but its repository role, ci-maintainer, had no
permission to bypass branch protections, so a pull request ejected from
the merge queue showed the team only "Merge when ready".
Add bypass_branch_protection to the ci-maintainer role (osac and
osac-test-infra) and say so in its description and in the README.
Signed-off-by: Elior Erez <eerez@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
ci-maintainerrepository role of theci-dutyteam (onosacandosac-test-infra) gets the permissionbypass_branch_protection("Bypass branch protections").Why: the force-merge checkbox of a pull request ("Merge without waiting for requirements to be met") is offered only to someone who can bypass every rule on the branch.
ci-dutyalready bypasses the rulesets (ruleset_bypass_team_ids) and, onosac, the review requirements (pull_request_bypassers), but the role itself had no bypass permission. People of the team reported that a pull request that was ejected from the merge queue shows them only "Merge when ready" and no force merge, while one that never was queued shows the checkbox.What this changes: one entry in the permissions of
github_organization_repository_role.ci_maintainerand its description and comment, and a line in the README. Nothing else. After the apply, the role has the seven permissions it has in this repository (the Actions secrets and variables ones among them) plus the new one.Note: the permission was added by hand in the organization settings for a test, which also left the live role without the Actions secrets and variables permissions. The next apply puts both right, so please merge this before anyone edits the role again in the settings, or the apply will remove the manual bypass permission again.
Not verified: that the checkbox shows for a member of the team on an ejected pull request once the role has the permission. I could only check, with an account of the team, that GitHub already reports the team as able to bypass the ruleset and to merge as admin on every pull request. Please check on an ejected pull request after the apply.
Summary
bypass_branch_protectionto theci-maintainerrepository role forosacandosac-test-infra. The role description and comments now document this permission alongside its existing repository and Actions permissions.ci-dutymembers bypass branch protection when merging, including access to GitHub’s “Merge without waiting for requirements to be met” checkbox. That behavior was not verified on an ejected pull request.Risk classification
The applied risk label and the criteria for
risk:ship,risk:show, orrisk:askwere not supplied. The repository search found no labeling criteria. The classification, including whether the change was close to another label, cannot be determined from the available evidence.