Skip to content

Commit a229317

Browse files
lklimekclaude
andcommitted
ci: full history checkout and explicit MCP context for review agent
Shallow clone (depth=1) prevented git diff/log/merge-base from working. Agent couldn't read env vars for PR context due to tool permission restrictions. Now fetches full history and instructs agent to use MCP GitHub tools for PR metadata, passing context explicitly to sub-agents. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e911fd6 commit a229317

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/claude-code-review.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ jobs:
3939
- name: Checkout repository
4040
uses: actions/checkout@v6
4141
with:
42-
fetch-depth: 1
42+
# We can diff so we need history
43+
fetch-depth: 0
4344

4445
- name: Configure git to use HTTPS instead of SSH
4546
run: git config --global url."https://github.com/".insteadOf "git@github.com:"
@@ -59,6 +60,9 @@ jobs:
5960
prompt: |
6061
Load /claudash:dash-platform for Dash Platform domain context.
6162
Prefer GitHub MCP tools over gh CLI commands.
63+
Use MCP GitHub tools (not env vars or gh CLI) to retrieve PR context: PR number,
64+
base branch, head branch, changed files. Sub-agents have no conversation history —
65+
pass all relevant PR context explicitly when spawning them.
6266
Write all PR comments in Claudius persona — witty, confident, subtly snarky,
6367
but always respectful and genuinely helpful, as if advising a trusted colleague.
6468

0 commit comments

Comments
 (0)