feat(claude-code-review): make checkout fetch-depth a caller input - #68
Open
rekibnikufesin wants to merge 1 commit into
Open
feat(claude-code-review): make checkout fetch-depth a caller input#68rekibnikufesin wants to merge 1 commit into
rekibnikufesin wants to merge 1 commit into
Conversation
devops's own inline review workflow used fetch-depth: 0 deliberately (PR #1589, andres-monje): the review's "historical git context" pass walks history against the base branch to check whether a claim about surrounding code still holds on main, and a shallow checkout has no ancestry for that walk, so it can re-flag an issue elsewhere in a touched file that a since-merged commit already fixed on main. Migrating devops to this shared workflow would have silently dropped that fix - the checkout here was hardcoded to fetch-depth: 1. Rather than change the default for every consumer (some may prefer the faster shallow checkout and not need the historical pass), expose it as an optional fetch_depth input, default 1 (unchanged behavior), so repos that want full history can opt in per-repo.
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an optional
fetch_depthinput (default1, unchanged behavior) toai-platform-claude-code-review.ymland wires it into the checkout step'sfetch-depth, instead of the hardcoded1.Why
While migrating
0xPolygon/devopsonto this shared workflow (approver mode), I found devops's existing inline review workflow setfetch-depth: 0deliberately — added in devops#1589 by @Andres-Monje:This shared workflow's checkout was hardcoded to
fetch-depth: 1, so every consumer using it (comment or approve mode) is missing that fix — the review can re-flag an issue elsewhere in a touched file that a since-merged commit onmainalready resolved, because a shallow checkout has no commit ancestry for the historical-context pass to walk.Rather than change the default for everyone (some repos may prefer the faster shallow checkout and don't rely on the historical pass), this exposes it as a per-repo opt-in:
Verification
1.fetch_depth: 0in its caller once this merges and its pin is bumped (0xPolygon/devops#2086).🤖 Generated with Claude Code