Update default branch from master to main
What does this MR do?
main
from master
docs: update reference to Run the command below so that you get all the master
strings. We are
ignoring some of them explictly since they are rules, or upstream
changes.
rg --hidden 'master' -g '!faq/README.md' -g '!.vale/gitlab/DefaultBranch.yml' -g '!.vale/gitlab/InclusionCultural.yml' -g '!executors/kubernetes.md'
This commit assumuses that
https://gitlab.com/gitlab-org/charts/gitlab-runner is using main
as a
default branch as well.
ci: update default branch to be main
Run the following commnad to find all reference to master
:
rg 'master' -g '!.gitlab/issue_templates/trainee-backend-maintainer.md' -g '!.gitlab/issue_templates/Security developer workflow.md' -g '!.gitlab/ci/docs.gitlab-ci.yml' .gitlab
master
reference to main
or tags
refactor: Update all tests, links that point to master
to either main
or a
specific tag.
Final command to check of master
string:
rg 'master' -g '!.gitlab/issue_templates/trainee-backend-maintainer.md' -g '!.gitlab/issue_templates/Security developer workflow.md' -g '!.gitlab/ci/docs.gitlab-ci.yml' -g '!docs/faq/README.md' -g '!docs/.vale/gitlab/DefaultBranch.yml' -g '!docs/.vale/gitlab/InclusionCultural.yml' -g '!docs/executors/kubernetes.md' -g '!vendor/' -g '!.git' -g '!CONTRIBUTING.md' -g '!common/config.go' -g '!executors/kubernetes/kubernetes_test.go' -g '!Makefile' -g '!CHANGELOG.md' -g '!PROCESS.md'
Ignore the .gitlab/ci/docs.gitlab-ci.yml
since it depends on upstream
changes which will be done in !2925 (merged)
Why was this MR needed?
In gitlab-com/gl-infra/delivery#1357 (closed) we are changing all the gitlab-org
projects to use the main
branch as the default branch.
What's the best way to test this MR?
You can use rg to filter for the master
string and see that all usage of the master
string is valid. You can then start passing -g '!$PATH'
flags to start ignoring files and then you should end up with the command below:
rg 'master' -g '!.gitlab/issue_templates/trainee-backend-maintainer.md' -g '!.gitlab/issue_templates/Security developer workflow.md' -g '!.gitlab/ci/docs.gitlab-ci.yml' -g '!docs/faq/README.md' -g '!docs/.vale/gitlab/DefaultBranch.yml' -g '!docs/.vale/gitlab/InclusionCultural.yml' -g '!docs/executors/kubernetes.md' -g '!vendor/' -g '!.git' -g '!CONTRIBUTING.md' -g '!common/config.go' -g '!executors/kubernetes/kubernetes_test.go' -g '!Makefile' -g '!CHANGELOG.md' -g '!PROCESS.md'