Closed kptdobe closed 3 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?
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
.
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 ?
@tripodsan I created an issue: adobe/helix-resolve-git-ref#253
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
So cool! Thanks @dominique-pfister
updated list:
closing - helix-pages is the last one, which will we can rename, once helix2 doesn't need it anymore.
Adobe Engineering Council decided that
master
branch should be renamed tomain
. 2 main operations are required to be performed for each of our repos:main
branch, make it the default branch and delete themaster
branch. See here for easy step-by-step instructions.master
bymain
, at least whenmaster
refers to a branch name (which is often the case in Helix since we use themaster
branch as default to find content and code during rendering).Here is a query to find all
master
occurrences (532 546509) 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