Skip to content

CI: rebased-on-main check for main's branch protection - #16

Merged
allsmog merged 1 commit into
mainfrom
ci/rebased-on-main
Oct 23, 2026
Merged

allsmog merged 1 commit into
mainfrom
ci/rebased-on-main

Conversation

@allsmog

@allsmog allsmog commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Adds .github/workflows/rebased-on-main.yml, a check that passes only when the PR contains the current tip of its base branch.

Main's branch protection now requires this check and requires branches to be up to date before merging, with admins included. Once this lands, a PR that falls behind main can't merge until it is rebased onto main (the PR page's "Update branch" button offers "Update with rebase").

Until this PR merges, nothing can merge into main, since the required check doesn't exist on main yet. This PR runs the check on itself, so it can pass and be merged first.

Open PRs (#10, #14, #15, and #11/#13 once retargeted) need one rebase onto main after this lands so the check runs on them.

Adds the status check that main's branch protection requires. Together with "require branches to be up to date", a PR that is behind main can't merge until it is rebased.
@allsmog
allsmog force-pushed the ci/rebased-on-main branch from 5787979 to 0b78a38 Compare October 23, 2026 16:26
@allsmog
allsmog merged commit 4dbf876 into main Oct 23, 2026
1 check passed
@liminalshruti

Copy link
Copy Markdown
Collaborator

Merged without an approving review; per the founder it stays merged. Follow-ups are in LIM-2441 (https://linear.app/liminal-space-io/issue/LIM-2441): (1) it doesn't enforce a rebase, so a branch that merges main in passes; turn on required linear history or reject merge commits in $BASE..HEAD; (2) a re-run checks the stale base.sha, so use the live origin/$BASE_REF; (3) add a branches: [main] filter; (4) add a merge_group trigger; (5) skip runs on description-only edits and pin actions/checkout to a full SHA.

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.

2 participants