You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A GitHub Action for running [cagent](https://github.com/docker/cagent) AI agents in your workflows. This action simplifies the setup and execution of CAgent, handling binary downloads and environment configuration automatically.
3
+
A GitHub Action for running [cagent](https://github.com/docker/cagent) AI agents in your workflows. This action simplifies the setup and execution of cagent, handling binary downloads and environment configuration automatically.
4
4
5
5
## Quick Start
6
6
@@ -9,7 +9,7 @@ A GitHub Action for running [cagent](https://github.com/docker/cagent) AI agents
This repo provides a **reusable workflow** at `.github/workflows/review-pr.yml` that adds AI-powered PR reviews to any repository. It supports automatic reviews on PR open, manual `/review` comments, and feedback learning.
283
-
284
-
#### Setup (Explicit Secrets — No `secrets: inherit`)
285
-
286
-
This is the security-team-friendly approach. Only the secrets the workflow needs are passed explicitly — nothing else from your repository leaks across the boundary:
287
-
288
-
```yaml
289
-
name: PR Review
290
-
on:
291
-
issue_comment: # Enables /review command in PR comments
292
-
types: [created]
293
-
pull_request_review_comment: # Captures feedback on review comments for learning
294
-
types: [created]
295
-
pull_request_target: # Triggers auto-review on PR open; uses base branch context so secrets work with forks
CAGENT_ORG_MEMBERSHIP_TOKEN: ${{ secrets.CAGENT_ORG_MEMBERSHIP_TOKEN }} # PAT with read:org scope; gates auto-reviews to org members only
309
-
CAGENT_REVIEWER_APP_ID: ${{ secrets.CAGENT_REVIEWER_APP_ID }} # GitHub App ID; reviews appear as your app instead of github-actions[bot]
310
-
CAGENT_REVIEWER_APP_PRIVATE_KEY: ${{ secrets.CAGENT_REVIEWER_APP_PRIVATE_KEY }} # GitHub App private key; paired with App ID above
311
-
```
312
-
313
-
> **Why not `secrets: inherit`?** Using explicit secrets follows the principle of least privilege — the called workflow only receives the secrets it actually needs, not every secret in your repository. This is the recommended approach for public repos and security-conscious teams.
314
-
315
-
If you use a different LLM provider, replace `ANTHROPIC_API_KEY` with the appropriate secret (e.g., `OPENAI_API_KEY`, `GOOGLE_API_KEY`). See the full list in the secrets reference below.
316
-
317
-
#### Reusable Workflow Secrets Reference
318
-
319
-
| Secret | Required | Description |
320
-
| ------ | -------- | ----------- |
321
-
| `ANTHROPIC_API_KEY` | Yes* | Anthropic API key (or any one LLM key below) |
322
-
| `OPENAI_API_KEY` | No* | OpenAI API key |
323
-
| `GOOGLE_API_KEY` | No* | Google Gemini API key |
| `CAGENT_ORG_MEMBERSHIP_TOKEN` | No | Classic PAT with `read:org` scope for auto-review gating |
329
-
| `CAGENT_REVIEWER_APP_ID` | No | GitHub App ID for custom reviewer identity |
330
-
| `CAGENT_REVIEWER_APP_PRIVATE_KEY` | No | GitHub App private key (paired with App ID) |
263
+
### PR Review Workflow
331
264
332
-
_*At least one LLM API key is required._
265
+
For comprehensive documentation on setting up AI-powered PR reviews, including features like automatic reviews, the `/review` command, feedback learning, and customization options, see the **[PR Review documentation](review-pr/README.md)**.
333
266
334
267
### Manual Trigger with Inputs
335
268
@@ -384,5 +317,5 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
0 commit comments