Skip to content

added PR reviewer workflow#404

Open
derekmisler wants to merge 1 commit intodocker:mainfrom
derekmisler:mcp-gateway
Open

added PR reviewer workflow#404
derekmisler wants to merge 1 commit intodocker:mainfrom
derekmisler:mcp-gateway

Conversation

@derekmisler
Copy link

@derekmisler derekmisler commented Feb 13, 2026

What I did

Added an automated PR review workflow powered by the shared docker/cagent-action reusable workflow. This enables AI-assisted code review on every new or ready-for-review PR, as well as on-demand via /review in PR comments. The workflow feeds the repo's CLAUDE.md as additional context so reviews are informed by project-specific conventions.

Key details:

  • Triggers on PR opened, PR marked ready for review, issue comments, and review comments
  • Uses pull_request_target so secrets are available even for fork PRs
  • Explicitly passes required secrets rather than using secrets: inherit
  • Reviews appear under the docker-agent identity (not the generic github-actions[bot])
  • Auto-reviews are gated to org members only via CAGENT_ORG_MEMBERSHIP_TOKEN
  • Scoped permissions: read for contents, write for pull-requests and issues

Related issue

Closes https://github.com/docker/gordon/issues/132

(not mandatory) A picture of a cute animal, if possible in relation to what you did

ai-review

Signed-off-by: Derek Misler <derek.misler@docker.com>
@derekmisler derekmisler self-assigned this Feb 13, 2026
@derekmisler derekmisler marked this pull request as ready for review February 13, 2026 20:54
@derekmisler derekmisler requested a review from a team as a code owner February 13, 2026 20:54
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 85814c892f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


jobs:
review:
uses: docker/cagent-action/.github/workflows/review-pr.yml@latest

Choose a reason for hiding this comment

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

P1 Badge Pin reusable workflow to an immutable ref

Calling docker/cagent-action/.github/workflows/review-pr.yml@latest makes execution depend on a mutable upstream ref, so future tag moves can silently change behavior or run compromised code while this job has write permissions and receives ANTHROPIC_API_KEY and app private key secrets. Pinning to a commit SHA (or tightly controlled immutable release ref) is needed to prevent supply-chain drift and secret-handling risk introduced by this workflow.

Useful? React with 👍 / 👎.

Copy link
Author

Choose a reason for hiding this comment

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

i'll leave that up to you all. other teams are cool with using @latest, so they can easily stay up-to-date, but I'm fine with a hash instead

Copy link
Author

Choose a reason for hiding this comment

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

The latest (immutable) tag is v1.1.8, if you'd prefer. Otherwise I can include the hash (pinata requires it, for example)

Comment on lines +4 to +5
issue_comment: # Enables /review command in PR comments
types: [created]

Choose a reason for hiding this comment

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

P2 Badge Gate issue_comment runs to PR comments only

issue_comment events are emitted for both issues and pull requests, but this workflow unconditionally dispatches the review job, so ordinary issue comments can trigger the reviewer path without PR context. In repos where non-PR issue comments are common, this causes unnecessary runs (and unnecessary secret-bearing executions) and can produce failures/noise if the called workflow expects a PR payload; add an if: github.event.issue.pull_request guard for this path.

Useful? React with 👍 / 👎.

Copy link
Author

Choose a reason for hiding this comment

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

the workflow handles this

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