Repository navigation
Conversation
Co-authored-by: Claude <[email protected]>
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - uses: actions/setup-node@v4 |
There was a problem hiding this comment.
Bug: The git diff command will fail because the default shallow clone (fetch-depth: 1) lacks the necessary history to find the merge base for a three-dot diff.
Severity: HIGH
Suggested Fix
To ensure the git diff command can find the merge base, configure the actions/checkout@v4 step to perform a full clone by setting fetch-depth: 0. This provides the complete git history needed for the operation to succeed.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: .github/workflows/review.yml#L29
Potential issue: The workflow uses `actions/checkout@v4` with its default shallow clone
setting (`fetch-depth: 1`). A subsequent step runs `git diff origin/${{ github.base_ref
}}...HEAD` to generate a diff for the review agent. This three-dot diff command requires
access to the repository's history to find the merge base between the base branch and
the pull request's HEAD. In a shallow clone, this history is missing, which will cause
the `git diff` command to fail and halt the workflow. Since there is no error handling,
the review agent will not run.
Did we get this right? 👍 / 👎 to inform future reviews.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 329a953. Configure here.
| working-directory: apps/pr-reviewer | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: |
There was a problem hiding this comment.
Shallow checkout breaks PR diff
High Severity
Removing fetch-depth: 0 makes actions/checkout@v4 use its default depth of 1, so the clone has only the triggering commit. The later git diff origin/${{ github.base_ref }}...HEAD needs that base ref and the merge-base, which a shallow checkout does not provide. The export step fails and the review agent never runs.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 329a953. Configure here.
|
The store branch work is on main now (973ed2e). The cache-lifetime demo pull request replaces this one. |


Loyalty points now depend on a tier: gold members earn 2 points per dollar and everyone else keeps the 1.5 default. The tier is an optional second argument to pointsFor, and the tests cover both. The review workflow also checks out with the default depth.
Created with Claude Code