feat(pr-review): skip self-authored pull requests instead of failing - #21
Merged
Merged
Conversation
A PR opened by the reviewer's own identity (release candidates, settle PRs, dependency bumps by the mega-maxwell app) used to reach claude-code-action, which refuses bot-initiated events, leaving the status comment at 'Review did not finish: MODEL_ACTION_FAILED'. prepare() now recognises the author as the reviewer identity, routes the round to skip before any model step, and announces it with a new 'skipped' sticky phase; the job summary reports the same reason. allowed_bots is unchanged: it still governs which bots may trigger a review of someone else's PR. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013eLFMaDpEwgDzyDBzCQzLH
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.
Why
mega-agents#291 (a release-candidate PR opened by
mega-maxwell[bot]) showed the review status as 🛠️ Review did not finish —MODEL_ACTION_FAILED. The real cause wasclaude-code-actionrefusing a bot-initiated event (Workflow initiated by non-human actor: mega-maxwell), which is correct behaviour reported as a failure. A PR the reviewer opened itself is not a review target, and the status should say so.What
prepare()recognises the PR author as the reviewer's own identity (the app behindgithub_identity_token, via the existingis_bot_login) and routes the round toskipbefore any model step, soclaude-code-actionis never invoked for it.skipped: ⏭️ Review skipped — "This pull request is not a review target: opened by mega-maxwell[bot], the reviewer's own identity. No review round runs for it." Other skip reasons stay silent, as before.⏭️ The current PR head was already reviewed.(factored intoreport_status_line).allowed_botsis unchanged — it still governs which bots may trigger a review of someone else's PR.Not in this PR
The repo has committed
__pycache__/*.pycfiles (two pre-existing underclaude-pr-review, two added by #15 by mistake). Left untouched here; separate cleanup.🤖 Generated with Claude Code