action: infer compare base refs#1361
Conversation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, 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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ 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 |
Glass CockpitBase: origin/main Change Surface:
Composition:
Contracts:
Health: 100/100 (A) Review Plan
ReceiptsFull receipt data available in JSON format. |
There was a problem hiding this comment.
Code Review
This pull request implements automatic base git reference inference for the cockpit and sensor modes when the base input is omitted. It introduces a resolve_base_ref shell function that determines the appropriate reference using GITHUB_BASE_REF for pull requests or origin/HEAD for other events, including logic to fetch remote branches if they are missing. The review feedback suggests improving the debuggability of the action by allowing standard error output from git commands to be visible in the logs rather than suppressing it, which would help diagnose network or configuration issues.
|
|
||
| fetch_origin_branch() { | ||
| local branch="$1" | ||
| git fetch --no-tags --depth=1 origin "${branch}:refs/remotes/origin/${branch}" >/dev/null 2>&1 |
There was a problem hiding this comment.
Redirecting both stdout and stderr to /dev/null can make debugging difficult if the fetch fails due to authentication or network issues. While the subsequent error message at line 242 is helpful, allowing stderr to be visible here would provide more context for troubleshooting.
git fetch --no-tags --depth=1 origin "${branch}:refs/remotes/origin/${branch}" >/dev/null| fi | ||
| else | ||
| if ! git symbolic-ref --quiet refs/remotes/origin/HEAD >/dev/null 2>&1; then | ||
| git remote set-head origin -a >/dev/null 2>&1 || true |
Summary
baseis omitted instead of defaulting to hardcodedmainorigin/$GITHUB_BASE_REFfor pull request runs andorigin/HEADfor other events, fetching refs when neededbasevalues unchangedValidation
cargo fmt-checkcargo xtask publish-surface --jsoncargo xtask publish-surface --json --verify-publishcargo xtask gate --checkcargo deny --all-features check(passes with existing duplicate/advisory warnings)npm test --prefix web/runner(passes; existing real-wasm-bundle case remains skipped when bundle is absent)Deferred follow-ups