Repository navigation
ci: count an area-owner approval only for the commit it was given on - #258
Closed
sophiecarreras wants to merge 1 commit into
Closed
sophiecarreras wants to merge 1 commit into
sophiecarreras wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
Author
|
Superseded by #259, opened from a branch in this repo so the area-owner-approvals workflow gets a token that can post commit statuses (fork PRs get a read-only token). |
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.
What
An area-owner approval now counts only if its
commit_idequals the PR's current head SHA, so a new push needs fresh approvals. A CHANGES_REQUESTED review still blocks regardless of commit, so a new commit never silently clears it. The PR author is still implicitly approved for areas they own. Followsintent/review-process/intent.md, point 2 ("Approvals cover one commit").Changes in
.github/workflows/require-area-approvals.yml(+8/-2):HEAD_SHAis exported so the Python step can read it.APPROVEDreview whosecommit_idis not the head SHA is recorded asSTALE_APPROVED, which counts for nothing.Unchanged: Dependabot guard, CODEOWNERS parsing, write-permission filtering, fail-safe red,
area-owner-approvalsstatus name.pull_requestalready hassynchronize, so a push re-evaluates.Risk
.github/workflows/is a High-tier path. Thearea-owner-approvalsstatus is a soft, non-blocking signal, so the effect is that approvals go stale after each push and owners must re-approve. A review with nocommit_idis treated as stale. An empty or rebase-only push also invalidates approvals.How to revert
Revert the single commit.
Testing
Ran the extracted Python step offline against a hand-made reviews fixture (head SHA
new):oldonly: failure, awaiting.newonly: success.old+ carol CHANGES_REQUESTED onold: failure, changes requested by carol.new: failure, changes requested by carol.Not verified: actionlint/yamllint not installed (YAML parse only);
pathspecstubbed (only the*rule); not run on a live PR.Changelog
No library code changed, so no
.changes/unreleasedentry. Needs theskip-changeloglabel.🤖 Generated with Claude Code