Community: Replace `master` with `main` branch name systematically

Created on 1 Jul 2020  路  30Comments  路  Source: open-telemetry/community

Most helpful comment

@bobstrecansky renamed

All 30 comments

the only question here whether we want to go ahead now or wait for github to unify the names: https://twitter.com/natfriedman/status/1271253144442253312

Based on the number of repos we'd need to update, I think we should probably wait for GitHub if that support is coming.

I've recently been involved in doing this, and it only takes a few minutes per repo. It took my ~30 minutes to do it for 5 repos.

Steps:
1) create new main branch from master
2) update open PRs to point to main (can be done by editing the PR and selecting target branch)
3) update branch protection rule pattern to target main
4) remove master branch

The time consuming part is 2), depending on how many open PRs there are.

I'd happily volunteer to do the work, but it does require admin access to each repository.

https://github.com/github/renaming

It looks we can simply wait for a little and the migration will be automated by GitHub.

Renamed the issue to indicate the name that GitHub will be using as a default

We talked about this in the Maintainers meeting today - the maintainers generally seemed like waiting until the automatic github renaming occurred later this year was sufficient. If we decide it must happen earlier, I don't foresee a lot of resistance against that kind of initiative.

Need to start making progress here. See: https://github.com/github/renaming#renaming-existing-branches - GitHub implemented the renaming

@SergeyKanzhelev - I went to do this for https://github.com/open-telemetry/opentelemetry-php/ and I didn't have permissions to see https://github.com/open-telemetry/opentelemetry-php/settings/branches - Would you either be able to grant me permissions or make this change for our repo?

@bobstrecansky It looks like the @open-telemetry/php-maintainers team is assigned the Maintain role for the PHP repo but one needs to be Admin to change the default branch. Most repos currently have the Admin role set but the guidelines would prescribe the Maintain role. I filed #616 to have this fixed in one or the other direction.

For now I can go ahead and rename master to main as described in Sergey's link above once you confirm you're ready for that. I think you'll still have to update at least https://github.com/open-telemetry/opentelemetry-php/blob/master/.github/workflows/php.yml manually.

JS already started this process by adding main to our list of branch names for CI actions. I ran a quick query on the github API to get the current state:

| # | repo | branch renamed |
|-|--------------------------------------|----------------|
| 1 | .github | yes |
| 2 | build-tools | yes |
| 3 | community | yes |
| 4 | docs-cn | yes |
| 5 | docs-ja | yes |
| 6 | opentelemetry-collector | yes |
| 7 | opentelemetry-collector-contrib | yes |
| 8 | opentelemetry-collector-builder | yes |
| 9 | opentelemetry-cpp | yes |
| 10 | opentelemetry-cpp-contrib | yes |
| 11 | opentelemetry-dotnet | yes |
| 12 | opentelemetry-dotnet-contrib | yes |
| 13 | opentelemetry-dotnet-instrumentation | yes |
| 14 | opentelemetry-erlang | yes |
| 15 | opentelemetry-erlang-api | Archived |
| 16 | opentelemetry-go | yes |
| 17 | opentelemetry-go-contrib | yes |
| 18 | opentelemetry-go-vanityurls | yes |
| 19 | opentelemetry-helm-charts | yes |
| 20 | opentelemetry-java | yes |
| 21 | opentelemetry-java-contrib | yes |
| 22 | opentelemetry-java-instrumentation | yes |
| 23 | opentelemetry-js | yes |
| 24 | opentelemetry-js-api | yes |
| 25 | opentelemetry-js-contrib | yes |
| 26 | opentelemetry-lambda-extension | yes |
| 27 | opentelemetry-log-collection | yes |
| 28 | opentelemetry-operator | yes |
| 29 | opentelemetry-php | yes |
| 30 | opentelemetry-proto | yes |
| 31 | opentelemetry-proto-go | yes |
| 32 | opentelemetry-python | yes |
| 33 | opentelemetry-python-contrib | yes |
| 34 | opentelemetry-ruby | yes |
| 35 | opentelemetry-rust | yes |
| 36 | opentelemetry-specification | yes |
| 37 | opentelemetry-swift | yes |
| 38 |opentelemetry.io| yes |
| 39 | oteps | yes |
| 40 | private-repo | yes |

_last updated 1/28/2021 at 11:15 ET_

@bobstrecansky It looks like the @open-telemetry/php-maintainers team is assigned the Maintain role for the PHP repo but one needs to be Admin to change the default branch. Most repos currently have the Admin role set but the guidelines would prescribe the Maintain role. I filed #616 to have this fixed in one or the other direction.

For now I can go ahead and rename master to main as described in Sergey's link above once you confirm you're ready for that. I think you'll still have to update at least https://github.com/open-telemetry/opentelemetry-php/blob/master/.github/workflows/php.yml manually.

Yup; I'm happy to update that - feel free to rename master to main whenever you'd like, I'll make the updates accordingly after!

@bobstrecansky renamed

JS branch renamed

@lizthegrey I don't want to edit your original issue without consent, but if it's ok with you I'd like to add the table in this comment https://github.com/open-telemetry/community/issues/402#issuecomment-764822398 to the issue description and keep it updated once per day. As well as the link to the renaming procedure here: https://docs.google.com/document/d/1lkA0Re3vWfqXmuYLhL93Y6ABR27Sg6DzPcwi4kPXj0Y/edit

opentelemetry-java default branch has been renamed

Updated:

  • build-tools
  • community
  • docs-cn
  • docs-ja

Updated

  • opentelemetry-java-contrib
  • opentelemetry-helm-charts

Updated opentelemetry-go-vanityurls

Updated oteps

Updated opentelemetry-swift

updated opentelemetry-dotnet and opentelemetry-dotnet-contrib

cc: @cijothomas

updated opentelemetry-js and opentelemetry-js-contrib. opentelemetry-js-api was created with main.

Updated:

  • opentelemetry-collector
  • opentelemetry-proto

Updated:

  • opentelemetry-ruby (by @dazuma )
  • opentelemetry-operator

Thanks to @codeboten 馃憤

  • opentelemetry-python
  • opentelemetry-python-contrib

Few more updates thanks to @pjanotti and @MrAlias

  • opentelemetry-go
  • opentelemetry-dotnet-instrumentation

Updated:

  • opentelemetry.io

All repos updated except opentelemetry-erlang-api which is archived (cannot make changes to it) and will be deleted very soon.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RassK picture RassK  路  3Comments

WPH95 picture WPH95  路  3Comments

dashpole picture dashpole  路  3Comments

mtwo picture mtwo  路  4Comments

rakyll picture rakyll  路  4Comments