ci: checkout before paths-filter so push-to-main runs pass - #35
Conversation
The Detect changes job ran dorny/paths-filter without a checkout. On pull_request events that is fine — it lists changed files via the GitHub API. But on push events (the merge of #34 to main) there is no PR to query, so paths-filter falls back to a local git diff and needs a working copy. With no .git present its first git command failed: fatal: not a git repository The process '/usr/bin/git' failed with exit code 128 This surfaced only after merge, since #34 introduced the job itself and push-to-main was the first push event to exercise it. Add actions/checkout as the first step so the job works on both push and pull_request.
|
Warning Review limit reached
More reviews will be available in 15 minutes and 11 seconds. Learn how PR review limits work. To continue reviewing without waiting, purchase usage credits in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
The
CIrun for the merge of #34 tomainfailed in the Detect changes job:Cause
The
changesjob randorny/paths-filter@v3without a checkout. That is fine onpull_requestevents, where paths-filter lists changed files via the GitHub API. But onpushevents (the merge tomain) there is no PR to query, so it falls back to a local git diff and needs a working copy. With no.gitpresent, its first git command fails with exit code 128.This surfaced only after merge: #34 introduced the
changesjob itself, and push-to-main was the firstpushevent to exercise it. The PR checks passed because they ran onpull_request.Fix
Add
actions/checkout@v6as the first step of thechangesjob so it works on bothpushandpull_request. Also updated the now-misleading comment.Impact