Skip to content

feat(agent-approval-check): detect agents by head-branch prefix - #53

Merged
falcorocks merged 1 commit into
mainfrom
falcorocks/agent-branch-prefixes
Aug 11, 2026
Merged

falcorocks merged 1 commit into
mainfrom
falcorocks/agent-branch-prefixes

Conversation

@falcorocks

@falcorocks falcorocks commented Aug 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds an optional agent_branch_prefixes input to the agent-approval-check action. 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

  • Default agent_branch_prefixes: "" (no change for existing consumers).
  • Prefix match is case-sensitive on the pull-request head ref.

Testing

  • python3 -m unittest discover -s actions/agent-approval-check -p 'test_*.py' -v (20 passing, incl. positive and negative branch-prefix cases)

@falcorocks
falcorocks requested review from a team as code owners August 11, 2026 11:32
@falcorocks falcorocks self-assigned this Aug 11, 2026
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
falcorocks force-pushed the falcorocks/agent-branch-prefixes branch from 84b7f87 to 4bb4180 Compare August 11, 2026 11:42
@falcorocks
falcorocks merged commit 0feabe1 into main Aug 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant