Skip to content

feat: allow docker-agent[bot] to trigger /review#65

Merged
derekmisler merged 1 commit intodocker:mainfrom
derekmisler:feat/allow-bot-review
Mar 3, 2026
Merged

feat: allow docker-agent[bot] to trigger /review#65
derekmisler merged 1 commit intodocker:mainfrom
derekmisler:feat/allow-bot-review

Conversation

@derekmisler
Copy link
Contributor

Summary

  • Add an exception to the manual-review job's bot filter to allow docker-agent[bot] to trigger /review via PR comments
  • Other bots remain blocked to prevent infinite loops

This enables automated workflows (e.g., issue triage in docker/cagent) to request AI reviews on PRs they create.

Test plan

  • Have docker-agent[bot] comment /review on a PR — verify the manual-review job triggers
  • Have a random bot comment /review — verify it is still blocked
  • Have a human comment /review — verify it still works as before

The manual-review job previously blocked all Bot-type users from
triggering /review. This adds an exception for docker-agent[bot] so
automated workflows (like issue triage) can request PR reviews.
@derekmisler derekmisler requested a review from a team as a code owner March 2, 2026 21:17
Copy link
Contributor

@docker-agent docker-agent bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

APPROVED — No issues found.

This PR correctly implements the intended logic:

  • Non-bot users can trigger /review commands (unchanged behavior)
  • docker-agent[bot] is explicitly whitelisted to trigger /review
  • All other bots remain blocked

The boolean logic (user.type != 'Bot' || user.login == 'docker-agent[bot]') properly allows:

  1. Any non-bot user (first clause)
  2. The specific bot docker-agent[bot] (second clause)
  3. Rejects all other bots (both clauses false)

The implementation is secure and follows GitHub Actions best practices for user identity verification.

derekmisler added a commit to derekmisler/docker-agent that referenced this pull request Mar 2, 2026
Auto-review checks org membership, which bots fail. The /review command
path (manual-review job) bypasses the org check, so we need to post the
comment explicitly. Requires docker/cagent-action#65 to allow the bot.
@derekmisler derekmisler merged commit a618c73 into docker:main Mar 3, 2026
11 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.

2 participants