Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ef65048

Browse files
authored
chore: migrate to main branch (googleapis#563)
1 parent f3222f7 commit ef65048

File tree

5 files changed

+41
-12
lines changed

5 files changed

+41
-12
lines changed

.github/sync-repo-settings.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# https://github.com/googleapis/repo-automation-bots/tree/master/packages/sync-repo-settings
2-
# Rules for master branch protection
1+
# https://github.com/googleapis/repo-automation-bots/tree/main/packages/sync-repo-settings
2+
# Rules for main branch protection
33
branchProtectionRules:
44
# Identifies the protection rule pattern. Name of the branch to be protected.
5-
# Defaults to `master`
6-
- pattern: master
5+
# Defaults to `main`
6+
- pattern: main
77
requiresCodeOwnerReviews: true
88
requiresStrictStatusChecks: true
99
requiredStatusCheckContexts:

.kokoro/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ python3 -m pip install --upgrade --quiet nox
4141
python3 -m nox --version
4242

4343
# If this is a continuous build, send the test log to the FlakyBot.
44-
# See https://github.com/googleapis/repo-automation-bots/tree/master/packages/flakybot.
44+
# See https://github.com/googleapis/repo-automation-bots/tree/main/packages/flakybot.
4545
if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]]; then
4646
cleanup() {
4747
chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot

.kokoro/test-samples-impl.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ for file in samples/**/requirements.txt; do
8080
EXIT=$?
8181

8282
# If this is a periodic build, send the test log to the FlakyBot.
83-
# See https://github.com/googleapis/repo-automation-bots/tree/master/packages/flakybot.
83+
# See https://github.com/googleapis/repo-automation-bots/tree/main/packages/flakybot.
8484
if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then
8585
chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot
8686
$KOKORO_GFILE_DIR/linux_amd64/flakybot

CONTRIBUTING.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ You'll have to create a development environment using a Git checkout:
5050
# Configure remotes such that you can pull changes from the googleapis/python-storage
5151
# repository into your local repository.
5252
$ git remote add upstream [email protected]:googleapis/python-storage.git
53-
# fetch and merge changes from upstream into master
53+
# fetch and merge changes from upstream into main
5454
$ git fetch upstream
55-
$ git merge upstream/master
55+
$ git merge upstream/main
5656

5757
Now your local repo is set up such that you will push changes to your GitHub
5858
repo, from which you can submit a pull request.
@@ -104,12 +104,12 @@ Coding Style
104104
variables::
105105

106106
export GOOGLE_CLOUD_TESTING_REMOTE="upstream"
107-
export GOOGLE_CLOUD_TESTING_BRANCH="master"
107+
export GOOGLE_CLOUD_TESTING_BRANCH="main"
108108

109109
By doing this, you are specifying the location of the most up-to-date
110110
version of ``python-storage``. The the suggested remote name ``upstream``
111111
should point to the official ``googleapis`` checkout and the
112-
the branch should be the main branch on that remote (``master``).
112+
the branch should be the main branch on that remote (``main``).
113113

114114
- This repository contains configuration for the
115115
`pre-commit <https://pre-commit.com/>`__ tool, which automates checking
@@ -190,7 +190,7 @@ The `description on PyPI`_ for the project comes directly from the
190190
``README``. Due to the reStructuredText (``rst``) parser used by
191191
PyPI, relative links which will work on GitHub (e.g. ``CONTRIBUTING.rst``
192192
instead of
193-
``https://github.com/googleapis/python-storage/blob/master/CONTRIBUTING.rst``)
193+
``https://github.com/googleapis/python-storage/blob/main/CONTRIBUTING.rst``)
194194
may cause problems creating links or rendering the description.
195195

196196
.. _description on PyPI: https://pypi.org/project/google-cloud-storage
@@ -215,7 +215,7 @@ We support:
215215

216216
Supported versions can be found in our ``noxfile.py`` `config`_.
217217

218-
.. _config: https://github.com/googleapis/python-storage/blob/master/noxfile.py
218+
.. _config: https://github.com/googleapis/python-storage/blob/main/noxfile.py
219219

220220
Python 2.7 support is deprecated. All code changes should maintain Python 2.7 compatibility until January 1, 2020.
221221

owlbot.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,32 @@
5050
python.py_samples(skip_readmes=True)
5151

5252
s.shell.run(["nox", "-s", "blacken"], hide_output=False)
53+
54+
# ----------------------------------------------------------------------------
55+
# Main Branch migration
56+
# ----------------------------------------------------------------------------
57+
58+
s.replace(
59+
"*.rst",
60+
"master",
61+
"main"
62+
)
63+
64+
s.replace(
65+
"*.rst",
66+
"google-cloud-python/blob/main",
67+
"google-cloud-python/blob/master"
68+
)
69+
70+
s.replace(
71+
"CONTRIBUTING.rst",
72+
"kubernetes/community/blob/main",
73+
"kubernetes/community/blob/master"
74+
)
75+
76+
s.replace(
77+
".kokoro/*",
78+
"master",
79+
"main"
80+
)
81+

0 commit comments

Comments
 (0)