Skip to content

pr-management-triage: allow maintainer @-mentions on the operator's own PRs#771

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:guard/mention-own-pr-exemption
Jul 7, 2026
Merged

pr-management-triage: allow maintainer @-mentions on the operator's own PRs#771
potiuk merged 1 commit into
apache:mainfrom
potiuk:guard/mention-own-pr-exemption

Conversation

@potiuk

@potiuk potiuk commented Jul 7, 2026

Copy link
Copy Markdown
Member

What

The mention guard enforced author-only notification on every guarded gh pr/issue comment (and gh pr edit --body). That also blocked a legitimate case: the operator nudging their own reviewers on their own PR.

Change

When the target PR/issue author is the authenticated gh user (gh api user), the guard now allows the mention. If operator resolution fails it falls through to the existing author-only rule (fail-safe). The MAGPIE_ALLOW_MENTIONS=1 override for any other deliberate exception is unchanged.

Tests / docs

  • New coverage: own-PR allows maintainers, case-insensitive, and others'-PR still denied when the operator resolves.
  • Made the existing fold-edit test hermetic (it previously relied on a real gh pr view failing, which broke once the own-PR exemption could fire against a real PR).
  • Updated the agent-guard README guard table and Golden rule 12 in the triage SKILL.

Full workspace pre-commit (ruff/mypy/pytest across all members) passes.

🤖 Generated with Claude Code

…wn PRs

The mention guard enforced author-only notification for every guarded
comment, which also blocked the legitimate case of the operator nudging
their own reviewers on their own PR. Exempt that case: when the target's
author is the authenticated `gh` user, allow the mention. Operator
resolution failing falls through to the existing author-only rule
(fail-safe). The `MAGPIE_ALLOW_MENTIONS=1` override for any other
deliberate exception is unchanged.

Adds own-PR test coverage (allow, case-insensitive, and others'-PR still
denied when the operator resolves), makes the existing fold-edit test
hermetic (it previously relied on a real `gh pr view` failing), and
updates the agent-guard README table and Golden rule 12.

Generated-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@potiuk potiuk merged commit 4b15dd1 into apache:main Jul 7, 2026
9 checks 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