Skip to content

fix: detect default branch instead of assuming main - #9

Merged
c0d3ster merged 1 commit into
mainfrom
fix/default-branch-detection
Aug 1, 2026
Merged

fix: detect default branch instead of assuming main#9
c0d3ster merged 1 commit into
mainfrom
fix/default-branch-detection

Conversation

@c0d3ster

@c0d3ster c0d3ster commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • run_repo in overnight.sh hardcoded git checkout main, which fails for target repos whose default branch is master (e.g. fractaleyez) — this is why pnpm overnight fractaleyez wasn't working.
  • Added a default_branch() helper that resolves origin/HEAD, falling back to checking for a local main then master branch, and errors clearly if neither exists.

Test plan

  • Run pnpm overnight fractaleyez (or equivalent) against a repo whose default branch is master and confirm it checks out and pulls correctly.
  • Run against a repo whose default branch is main and confirm no regression.

run_repo hardcoded 'git checkout main', which broke repos whose default
branch is still master (e.g. fractaleyez). Added default_branch() to resolve
origin/HEAD, falling back to checking for local main/master.
@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@c0d3ster, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 37 seconds

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e7053b1a-5bae-4470-9cb5-893f43e95b65

📥 Commits

Reviewing files that changed from the base of the PR and between f536476 and 47da9cd.

📒 Files selected for processing (1)
  • overnight.sh

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@c0d3ster
c0d3ster merged commit a570dc0 into main Aug 1, 2026
1 check passed
@c0d3ster
c0d3ster deleted the fix/default-branch-detection branch August 1, 2026 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant