Repository navigation
feat(agent-approval-check): detect agents by head-branch prefix - #53
Merged
Merged
Conversation
Add an optional agent_branch_prefixes input so a pull request whose head branch starts with a configured prefix is treated as agent-authored. This catches agents that open PRs from a shared account and commit under a configurable identity, without colliding with other automation on distinct branch prefixes. Defaults to empty (no behavior change for existing consumers).
falcorocks
force-pushed
the
falcorocks/agent-branch-prefixes
branch
from
August 11, 2026 11:42
84b7f87 to
4bb4180
Compare
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
Adds an optional
agent_branch_prefixesinput to theagent-approval-checkaction. A pull request whose head branch starts with one of the configured prefixes is treated as agent-authored, in addition to the existing author-login / commit-email / agent-review / >100-commit signals.Why
Some automations open pull requests from a shared account and commit under a configurable identity, which makes author/email an unreliable signal. A head-branch prefix is a stable, collision-free way to identify those pull requests when the account and branch conventions are distinct.
Behavior
agent_branch_prefixes: ""(no change for existing consumers).Testing
python3 -m unittest discover -s actions/agent-approval-check -p 'test_*.py' -v(20 passing, incl. positive and negative branch-prefix cases)