adobe / helix-home

The home of Project Helix
54 stars 86 forks source link

Rename branch "master" to "main" #140

Closed kptdobe closed 3 years ago

kptdobe commented 4 years ago

Adobe Engineering Council decided that master branch should be renamed to main. 2 main operations are required to be performed for each of our repos:

Here is a query to find all master occurrences (532 546 509) in our code: https://github.com/search?q=master+repo%3Aadobe%2Fgit-server+repo%3Aadobe%2Fhtlengine+repo%3Aadobe%2Fhelix-pipeline+repo%3Aadobe%2Fhelix-cli+repo%3Aadobe%2Fhelix-home+repo%3Aadobe%2Fproject-helix.io+repo%3Aadobe%2Fhelix-vulcain-filters+repo%3Aadobe%2Fhelix-publish+repo%3Aadobe%2Fvscode-helix+repo%3Aadobe%2Fparcel-plugin-htl+repo%3Aadobe%2Fhelix-shared+repo%3Aadobe%2Fhelix-embed+repo%3Aadobe%2Fhelix-simulator+repo%3Aadobe%2Fhelix-fetch+repo%3Aadobe%2Ftheblog+repo%3Aadobe%2Fhelix-pages+repo%3Aadobe%2Fopenwhisk-action-builder+repo%3Aadobe%2Fhelix-helpx+repo%3Aadobe%2Fparcel-plugin-jst+repo%3Aadobe%2Fopenwhisk-loggly-wrapper+repo%3Aadobe%2Fhelix-data-embed+repo%3Aadobe%2Fhelix-static+repo%3Aadobe%2Fhelix-dispatch+repo%3Aadobe%2Fhelix-run-query+repo%3Aadobe%2Fhelix-logging+repo%3Aadobe%2Fhelix-dockerimage+repo%3Aadobe%2Fhelix-perf+repo%3Aadobe%2Fhelix-ops+repo%3Aadobe%2Fprobot-serverless-openwhisk+repo%3Aadobe%2Fhelix-qr-code+repo%3Aadobe%2Fopenwhisk-action-utils+repo%3Aadobe%2Fhelix-service+repo%3Aadobe%2Fhelix-log+repo%3Aadobe%2Fhelix-library+repo%3Aadobe%2Fhelix-continuous+repo%3Aadobe%2Fhelix-status+repo%3Aadobe%2Fhelix-index-pipelines+repo%3Aadobe%2Fhelix-index-files+repo%3Aadobe%2Fhelix-testutils+repo%3Aadobe%2Fopenwhisk-action-logger+repo%3Aadobe%2Fhelix-query-index+repo%3Aadobe%2Fopenwhisk-probot-builder+repo%3Aadobe%2Ftheblog-tests+repo%3Aadobe%2Fhelix-redirect+repo%3Aadobe%2Fhelix-param-checker+repo%3Aadobe%2Fhelix-content-proxy+repo%3Aadobe%2Fhelix-example-advanced+repo%3Aadobe%2Fhelix-eslint-config+repo%3Aadobe%2Fhelix-auth-fastly+repo%3Aadobe%2Fhelix-index-big-tree+repo%3Aadobe%2Fhelix-resolve-git-ref+repo%3Aadobe%2Fhelix-example-basic+repo%3Aadobe%2Fhelix-querybuilder+repo%3Aadobe%2Fhelix-index-tree+repo%3Aadobe%2Fhelix-cache-flush+repo%3Aadobe%2Fhelix-onedrive-support&type=Code

stefan-guggisberg commented 4 years ago
trieloff commented 4 years ago

We can rename our branches to main right away, but changing the assumption that the default branch is main will break things (for all customer repos that have been created before GitHub changed the defaults). Isn't there a way to determine the default branch name in GitHub?

kptdobe commented 4 years ago

Correct, we have to be careful with the "code" part of the work: we'll have to support for a certain time 2 potential default branch name: master and main. GitHub said they will change the default default branch to main thus at one point, new customer repos will come with main. Once GitHub makes the change, if we drop master, we break backward comp (2 options then: either we migrate all existing customer repos or we support both).

https://developer.github.com/v3/repos/#get-a-repository gives the default_branch.

tripodsan commented 4 years ago

supporting both will be a bit tricky, since the fallback to master is at many places. like in the VCL, when the first part of a helix pages project is missing. we should probably remove all fallbacks and try to default as late as possible. maybe resolve-git-ref can figure out the default automatically? @stefan-guggisberg ?

stefan-guggisberg commented 4 years ago

@tripodsan I created an issue: adobe/helix-resolve-git-ref#253

tripodsan commented 4 years ago

see https://github.com/github/renaming

rofe commented 4 years ago

I changed the helix-home default branch to main, but left the master branch for now because Helix Pages still expects it when no branch is specified in the URL, e.g. https://helix-home--adobe.hlx.page/getting-started.html

dominique-pfister commented 4 years ago
rofe commented 4 years ago

So cool! Thanks @dominique-pfister

tripodsan commented 3 years ago

updated list:

tripodsan commented 3 years ago

closing - helix-pages is the last one, which will we can rename, once helix2 doesn't need it anymore.