Skip to content

feat(pr-review): skip self-authored pull requests instead of failing - #21

Merged
Troublor merged 1 commit into
mainfrom
troublor/feat/review-skips-self-authored
Sep 7, 2026
Merged

Troublor merged 1 commit into
mainfrom
troublor/feat/review-skips-self-authored

Conversation

@Troublor

@Troublor Troublor commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

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 was claude-code-action refusing 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 behind github_identity_token, via the existing is_bot_login) and routes the round to skip before any model step, so claude-code-action is never invoked for it.
  • New sticky-comment phase 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.
  • Job summary / log line reports the same reason instead of ⏭️ The current PR head was already reviewed. (factored into report_status_line).
  • allowed_bots is unchanged — it still governs which bots may trigger a review of someone else's PR.
  • README paragraph under PR review pipeline; 3 unit tests (104 pass).

Not in this PR

The repo has committed __pycache__/*.pyc files (two pre-existing under claude-pr-review, two added by #15 by mistake). Left untouched here; separate cleanup.

🤖 Generated with Claude Code

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
@Troublor
Troublor merged commit 66b5393 into main Sep 7, 2026
1 check passed
@Troublor
Troublor deleted the troublor/feat/review-skips-self-authored branch September 7, 2026 11:10
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