Skip to content

ci(pr-flow): add PR base guard — block stacked PRs#227

Open
0xmariowu wants to merge 1 commit into
mainfrom
chore/pr-base-guard
Open

ci(pr-flow): add PR base guard — block stacked PRs#227
0xmariowu wants to merge 1 commit into
mainfrom
chore/pr-base-guard

Conversation

@0xmariowu
Copy link
Copy Markdown
Owner

Why

Sister project lazie had stacked PRs (#108/#109/#110) desync under squash + auto-merge today. Adding the same guard repo-wide.

Topology-aware auto-merge wouldn't fix it: squash merge produces new SHAs that downstream PR base refs don't reflect, so the chain breaks even with correct ordering.

What

.github/workflows/assert-base-is-default-branch.yml — any PR whose base.ref != repository.default_branch fails. Branch from main, merge serially.

Test plan

  • This PR's base = main → check passes
  • After merge, intentional stacked PR is rejected

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings May 6, 2026 06:39
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

Warning

Rate limit exceeded

@0xmariowu has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 57 minutes and 48 seconds before requesting another review.

To continue reviewing without waiting, purchase usage credits in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9d171133-2b6e-4c00-a7b1-d1f552acd3fd

📥 Commits

Reviewing files that changed from the base of the PR and between 1ada0b9 and fbb6475.

📒 Files selected for processing (1)
  • .github/workflows/assert-base-is-default-branch.yml

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 and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

@copilot please address the blocking signals on this PR and push a fix commit.

Trigger: ci-failure
Details: Workflow "Semgrep" failed on run 25420414188

Follow the PR's .github/copilot-instructions.md hard rules. Do not suppress lints, skip tests, or weaken CI.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a lightweight GitHub Actions guardrail to prevent stacked PRs (PRs targeting another PR branch), avoiding desync scenarios under squash merges + auto-merge.

Changes:

  • Introduces a new workflow that fails any pull_request whose base branch is not the repository default branch.
  • Emits a clear failure annotation instructing contributors to branch from the default branch and merge serially.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants