Skip to content

Switch PR Agent to comment-triggered slash commands only - #59

Merged
yoonwaiyan merged 1 commit into
mainfrom
ci/pr-agent-manual-trigger
Jul 4, 2026
Merged

Switch PR Agent to comment-triggered slash commands only#59
yoonwaiyan merged 1 commit into
mainfrom
ci/pr-agent-manual-trigger

Conversation

@yoonwaiyan

@yoonwaiyan yoonwaiyan commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Removed the pull_request trigger (opened/synchronize) that ran PR-Agent's full default tool set (/describe, /review, /improve) on every PR open and every push — burning OpenAI tokens on every commit.
  • Switched to issue_comment: types: [created] — PR-Agent now only runs when someone comments a slash command (/review, /improve, /describe, /ask <question>) on a PR.
  • Added if: github.event.sender.type != 'Bot' so PR-Agent's own posted comments (via GITHUB_TOKEN) don't re-trigger the workflow on themselves.

Test plan

  • Open/push to a PR and confirm PR Agent does NOT auto-run
  • Comment /review on a PR and confirm PR Agent runs and posts a review
  • Confirm PR Agent's own review comment doesn't trigger another run

Auto-running on every PR open/push was burning OpenAI tokens on every
commit. Removed the pull_request trigger entirely in favor of
issue_comment, so /review, /improve, /describe, and /ask only run when
explicitly commented on a PR. Added a bot-sender guard so PR-Agent's
own comments (posted via GITHUB_TOKEN) don't re-trigger the workflow.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@yoonwaiyan
yoonwaiyan merged commit 23536ed into main Jul 4, 2026
6 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant