Skip to content

πŸ‘·β€β™€οΈ Accept main alongside master in workflow branch filters - #726

Merged
alecgibson merged 1 commit into
masterfrom
accept-main-in-workflow-filters
Sep 7, 2026
Merged

πŸ‘·β€β™€οΈ Accept main alongside master in workflow branch filters#726
alecgibson merged 1 commit into
masterfrom
accept-main-in-workflow-filters

Conversation

@alecgibson

Copy link
Copy Markdown
Collaborator

We're about to rename the default branch from master to main, and a branches: filter that names a branch which no longer exists doesn't error: it just matches nothing. Since this repo has no required checks, that would leave CI silently dark rather than visibly broken, and nothing would stop an untested merge.

The ordering is forced by how Actions resolves pull_request runs. The workflow file comes from the merge commit of head into base, and the branches: filter matches the base ref. So a PR that swapped master for main in one go would get no CI of its own while its base was still master, and neither would any of the open PRs the rename retargets, until each one was pushed again.

Listing both names sidesteps that. master matches until the rename, main matches after it, and every retargeted PR picks the filter up from its new base without needing a rebase. The master entry becomes dead config once the rename lands, and is removed in a follow-up.

πŸ€– Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

We're about to rename the default branch from `master` to `main`, and a
`branches:` filter that names a branch which no longer exists doesn't
error: it just matches nothing. Since this repo has no required checks,
that would leave CI silently dark rather than visibly broken, and
nothing would stop an untested merge.

The ordering is forced by how Actions resolves `pull_request` runs. The
workflow file comes from the merge commit of head into base, and the
`branches:` filter matches the *base* ref. So a PR that swapped
`master` for `main` in one go would get no CI of its own while its base
was still `master`, and neither would any of the open PRs the rename
retargets, until each one was pushed again.

Listing both names sidesteps that. `master` matches until the rename,
`main` matches after it, and every retargeted PR picks the filter up
from its new base without needing a rebase. The `master` entry becomes
dead config once the rename lands, and is removed in a follow-up.

πŸ€– Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 97.485%. first build β€” accept-main-in-workflow-filters into master

@alecgibson
alecgibson marked this pull request as ready for review September 7, 2026 12:06
@alecgibson
alecgibson merged commit f558a1a into master Sep 7, 2026
8 checks passed
@alecgibson
alecgibson deleted the accept-main-in-workflow-filters branch September 7, 2026 12:07
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