Repository navigation
fix(vig-utils): skip inline code spans when matching blocked emails - #1536
Merged
Merged
Conversation
…gate Encode the #1516 acceptance cases: the verbatim 1.10.0 CHANGELOG wording for #1503 (identity in an inline code span) must pass the PR fingerprint check, while real attributions -- trailers, Signed-off-by, Author lines -- must keep failing, case-insensitively, with name matching unchanged. Refs: #1521
The emails blocklist was matched as a bare substring over the whole content, so a changelog entry or PR body that quoted a bot identity while describing a bug blocked its own release PR. Strip inline Markdown code spans before email matching; names and trailers keep their existing semantics, so plain-text attributions still fail. Refs: #1521
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
Implements #1521 (follow-up to the #1516 train blocker): the
emailsblocklist incontains_agent_fingerprintmatched as a bare substring over the whole content, so a changelog entry or PR body that merely quotes a bot identity in an inline code span blocked its own release PR.Of the two options the issue offered, this takes code-span stripping, not the
_ATTRIBUTION_CONTEXT_REguard — deliberately: the context regex (…[\s-]+by\b) does not matchSigned-off-by:(the-off-infix) orAuthor:lines, so gating emails on it would let real attributions through and would have required deleting two deliberate #274-era pins. Instead:_CODE_SPAN_RE(`[^`\n]+`) — single-line so an unbalanced backtick can't swallow a following attribution line (pinned by test).nameskeeps its fix: PR fingerprint check blocks plain-text mentions of Cursor/Copilot #274 context guard, trailer rules still see raw lines, case-insensitivity preserved. Implemented in code rather thanallow_patternsbecause a TOML allow-pattern would also strip before name matching, weakening fix: PR fingerprint check blocks plain-text mentions of Cursor/Copilot #274.Test plan
git show 2c533424, load-bearing line quotinggithub-actions[bot]) now passescheck-pr-agent-fingerprintsrun against the real blocklist — previously reproduced the exact [BUG] Agent-fingerprint check blocks the release PR when the CHANGELOG describes an Actions-bot-identity bug #1516 CI failure.Co-authored-by,Signed-off-by,Author:attributions still fail;GitHub-Actions[Bot]case-insensitivity; names behavior unchanged; a trailer whose email is wrapped in backticks still fails via the trailer rule.packages/vig-utils/tests: 523 passed (+9 new);test_workflow_pr_agent_fingerprints.py+test_flake_hooks.py: 70 passed;prek run --all-filesexit 0 (verified independently of the implementation run).## Unreleasedsection run throughcheck-pr-agent-fingerprintsas PR_BODY → exit 0.Closes #1521