Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/grumpy-reviewer.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions .github/workflows/grumpy-reviewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,14 @@ permissions:
contents: read
pull-requests: read
engine: codex
imports:
- shared/pr-code-review-config.md
tools:
cache-memory: true
github:
min-integrity: approved
toolsets: [pull_requests, repos]
safe-outputs:
create-pull-request-review-comment:
max: 5
side: "RIGHT"
submit-pull-request-review:
max: 1
messages:
footer: "> 😤 *Reluctantly reviewed by [{workflow_name}]({run_url})*{history_link}"
run-started: "😤 *sigh* [{workflow_name}]({run_url}) is begrudgingly looking at this {event_type}... This better be worth my time."
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/pr-nitpick-reviewer.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 1 addition & 7 deletions .github/workflows/pr-nitpick-reviewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ permissions:
pull-requests: read
actions: read
engine: copilot
tools:
cache-memory: true
github:
toolsets: [pull_requests, repos]
safe-outputs:
create-discussion:
expires: 1d
Expand All @@ -19,16 +15,14 @@ safe-outputs:
max: 1
create-pull-request-review-comment:
max: 10
side: "RIGHT"
submit-pull-request-review:
max: 1
messages:
footer: "> 🔍 *Meticulously inspected by [{workflow_name}]({run_url})*{history_link}"
run-started: "🔬 Adjusting monocle... [{workflow_name}]({run_url}) is scrutinizing every pixel of this {event_type}..."
run-success: "🔍 Nitpicks catalogued! [{workflow_name}]({run_url}) has documented all the tiny details. Perfection awaits! ✅"
run-failure: "🔬 Lens cracked! [{workflow_name}]({run_url}) {status}. Some nitpicks remain undetected..."
timeout-minutes: 15
imports:
- shared/pr-code-review-config.md
- shared/reporting.md
---

Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/security-review.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions .github/workflows/security-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ permissions:
issues: read
security-events: read
tools:
cache-memory: true
github:
toolsets: [all]
agentic-workflows:
Expand All @@ -22,15 +21,14 @@ tools:
safe-outputs:
create-pull-request-review-comment:
max: 10
side: "RIGHT"
submit-pull-request-review:
max: 1
messages:
footer: "> 🔒 *Security review by [{workflow_name}]({run_url})*{history_link}"
run-started: "🔍 [{workflow_name}]({run_url}) is analyzing this {event_type} for security implications..."
run-success: "🔒 [{workflow_name}]({run_url}) completed the security review."
run-failure: "⚠️ [{workflow_name}]({run_url}) {status} during security review."
timeout-minutes: 15
imports:
- shared/pr-code-review-config.md
---

# Security Review Agent 🔒
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/shared/pr-code-review-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
# Base configuration for AI-powered PR code review workflows
# Provides: cache-memory, GitHub PR tools, and review comment safe-outputs

tools:
cache-memory: true
github:
toolsets: [pull_requests, repos]

safe-outputs:
create-pull-request-review-comment:
side: "RIGHT"
submit-pull-request-review:
max: 1
---

## PR Code Review Configuration

This shared component provides the standard tooling for AI pull request code review agents.

### Available Tools

- **`cache-memory`** — Persist review history across runs at `/tmp/gh-aw/cache-memory/`
- Store previous review notes: `/tmp/gh-aw/cache-memory/pr-{number}.json`
- Avoid repeating comments seen in previous reviews
- **GitHub PR tools** — Access PR diffs, file changes, review threads, and check runs

### Review Guidelines

1. **Check cache first** — Read `/tmp/gh-aw/cache-memory/pr-${{ github.event.issue.number }}.json` to avoid re-stating previous comments
2. **Use `get_diff`** — Fetch the actual diff to review line-by-line changes
3. **Use `get_review_comments`** — Check existing review threads before adding new ones
Comment on lines +30 to +32
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

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

The cache file path in these shared review guidelines hard-codes github.event.issue.number, which will be empty for workflows triggered by pull_request events (e.g., ready_for_review). This can lead to reading/writing pr-.json and losing the intended per-PR history. Use the same fallback pattern used elsewhere in this repo (e.g., ${{ github.event.issue.number || github.event.pull_request.number }}) for the cache filename.

Suggested change
1. **Check cache first** — Read `/tmp/gh-aw/cache-memory/pr-${{ github.event.issue.number }}.json` to avoid re-stating previous comments
2. **Use `get_diff`** — Fetch the actual diff to review line-by-line changes
3. **Use `get_review_comments`** — Check existing review threads before adding new ones
1. **Check cache first** — Read `/tmp/gh-aw/cache-memory/pr-${{ github.event.issue.number || github.event.pull_request.number }}.json` to avoid re-stating previous comments
2. **Use `get_diff`** — Fetch the actual diff to review line-by-line changes
3. **Use `get_review_comments` — Check existing review threads before adding new ones

Copilot uses AI. Check for mistakes.
Comment on lines +31 to +32
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

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

get_diff and get_review_comments are not standalone GitHub MCP tools in this repo; they’re methods on pull_request_read (see e.g. .github/workflows/dev-hawk.md and .github/workflows/copilot-agent-analysis.md). Consider rewording these bullets to explicitly instruct calling pull_request_read with method: get_diff / method: get_review_comments to avoid agents attempting to invoke non-existent tools.

Suggested change
2. **Use `get_diff`** — Fetch the actual diff to review line-by-line changes
3. **Use `get_review_comments`** — Check existing review threads before adding new ones
2. **Use `pull_request_read` with `method: get_diff`** — Fetch the actual diff to review line-by-line changes
3. **Use `pull_request_read` with `method: get_review_comments`** — Check existing review threads before adding new ones

Copilot uses AI. Check for mistakes.
4. **Submit as a unified review** — Batch comments and call `submit-pull-request-review` once with an overall assessment

### Safe Output Usage

- `create-pull-request-review-comment` — Post inline comments on specific lines
- `submit-pull-request-review` — Submit the overall review (APPROVE / REQUEST_CHANGES / COMMENT)
Loading