Repository navigation
A security fix pull request says the approval from a person its branch rules need - #971
Merged
Merged
Conversation
…h rules need
A security fix pull request CoderHelm opened on a repository whose
default branch requires an approving review, from someone other than the
last pusher, sat blocked with nothing saying why. CoderHelm opened it and
pushed every commit, so its own review can't count, and the security pass
followed only the pull request's state and CI.
While such a pull request is open, the security pass now reads its base
branch's rules (rulesets and classic protection) once. When they require
approving reviews and no person has approved the head, it says exactly
what is needed: once on the pull request ("Needs 1 approval from a person
(repo rule).", marked so it is never posted twice) and once on each of its
findings ("Needs 1 approval from a person (repo rule) on #N."). Adopted
pull requests are not read, and nothing posts in a dry run.
Incident case xo replays it.
Contributor
|
Auto-merge |
The comment that a security fix pull request needs a person's approval was posted straight to the tracker; it is now a note said through the conversation layer like every other comment. The read's result type gets a name so clippy passes.
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.
Summary
A security fix pull request CoderHelm opened on a repository whose default branch requires an approving review, from someone other than the last pusher, sat blocked and nothing said why. CoderHelm opened it and pushed every commit, so its own review can't count, and the security pass only followed the pull request's state and CI.
Changes
common::security_fixes:PrRef::person_approvals(the approvals the base branch requires, read once),approval_unread,approval_askandAPPROVAL_ASK_MARKER.security_fixes::track_prs: for an open fix pull request CoderHelm opened, reads the base branch's rulesets and classic protection once (read_approval_rule, usingmerge_standing::approvals_required). When they need approvals and no person approved the head, it comments once on the pull request ("Needs 1 approval from a person (repo rule).", skipped when a marked comment is already there) and adds one event to each finding ("Needs 1 approval from a person (repo rule) on #N.", the run page's own words). A person's approval at the head means it is read again on a later tick. Adopted pull requests are not read; nothing posts in a dry run.xo_security_fix_says_the_approval_it_needsand its doc.Verification
cargo fmt --check, the incidentsrustfmt --check, and the platform's text, domain examples, brand spelling, secret literal and workflow checks pass. Clippy and the workspace tests were still running locally when this opened; CI runs them. "Rust (tests)" also needs #970, which fixes a case that fails on main.