freifunk-gluon / gluon

a modular framework for creating OpenWrt-based firmwares for wireless mesh nodes
https://gluon.readthedocs.io
Other
553 stars 325 forks source link

Proposal: Rename development branch from master to main #3280

Closed neocturne closed 4 months ago

neocturne commented 5 months ago

As proposed by me in our April meetup:

It would be nice to follow many other projects and rename our development branch to main. When renaming the branch via Github, retargetting all open PRs would be taken care of automatically, and the Github web UI will redirect URLs from the old to the new branch.

The change would not be without churn however: According to https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/renaming-a-branch, all accesses using Git are not redirected, so everyone pulling from the Gluon master would need to update their configuration. Github actions mentioning the master branch would also need to be adjusted.

Options we may want to consider:

Mentioning all owners of the Gluon org for feedback, as we didn't have enough maintainers present at the last meetup for a decision:

Please react with :+1: or :-1: or comment if you have concerns.

mweinelt commented 5 months ago

Ideally the master branch would be gone, so that everyone would need to migrate instead of accidentally working on a stale branch.

AiyionPrime commented 5 months ago

Für mich klingt es als käme GitHub uns da schon gut entgegen:

Renaming a branch will:

  • Re-target any open pull requests Update any draft releases based on the branch
  • Move any branch protection rules that explicitly reference the old name
  • Show a notice to repository contributors, maintainers, and admins on the repository homepage with instructions to update local copies of the repository
  • Show a notice to contributors who git push to the old branch
  • Redirect web requests for the old branch name to the new branch name
  • Return a "Moved Permanently" response in API requests for the old branch name

https://github.com/github/renaming

blocktrron commented 5 months ago

I don't care about this change, so take me as neutral.

Perform the rename shortly after a major Gluon release?

I don't think we need to align this, given releases are built from release branches anyways.

However, please check if the CI or other tooling matches on branch naming.

rotanid commented 5 months ago

neutral, too. so it's decided. I assume, that the person bringing it up also takes care of the changes? @neocturne

neocturne commented 5 months ago
herbetom commented 5 months ago

At least with the newer Rulesets Feature it's possible to prevent creation:

  1. https://github.com/freifunk-gluon/gluon/settings/rules
  2. New Ruleset -> New branch ruleset
  3. give it a name
  4. Active enforcement
  5. empty bypass actors
  6. Add Target -> Include by pattern
  7. pattern: master
  8. enable "Restrict creations"
  9. Create

AFAIK Rulesets and branch protection rules can coexist, so no need to convert everything immediately

blocktrron commented 4 months ago

@neocturne This can be marked as done, right?