Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.

Commit 9e4ada8

Browse files
authored
chore: migrate default branch from master to main (#141)
1 parent 6c8c5d5 commit 9e4ada8

File tree

6 files changed

+68
-14
lines changed

6 files changed

+68
-14
lines changed

.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

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ All changes are from [#51](https://www.github.com/googleapis/python-container/is
141141

142142
### ⚠ BREAKING CHANGES
143143

144-
* migrate to microgenerator (#33). See the [migration guide](https://github.com/googleapis/python-container/blob/master/UPGRADING.md).
144+
* migrate to microgenerator (#33). See the [migration guide](https://github.com/googleapis/python-container/blob/main/UPGRADING.md).
145145

146146
### Features
147147

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-container
5151
# repository into your local repository.
5252
$ git remote add upstream git@github.com:googleapis/python-container.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.
@@ -110,12 +110,12 @@ Coding Style
110110
variables::
111111

112112
export GOOGLE_CLOUD_TESTING_REMOTE="upstream"
113-
export GOOGLE_CLOUD_TESTING_BRANCH="master"
113+
export GOOGLE_CLOUD_TESTING_BRANCH="main"
114114

115115
By doing this, you are specifying the location of the most up-to-date
116116
version of ``python-container``. The the suggested remote name ``upstream``
117117
should point to the official ``googleapis`` checkout and the
118-
the branch should be the main branch on that remote (``master``).
118+
the branch should be the main branch on that remote (``main``).
119119

120120
- This repository contains configuration for the
121121
`pre-commit <https://pre-commit.com/>`__ tool, which automates checking
@@ -209,7 +209,7 @@ The `description on PyPI`_ for the project comes directly from the
209209
``README``. Due to the reStructuredText (``rst``) parser used by
210210
PyPI, relative links which will work on GitHub (e.g. ``CONTRIBUTING.rst``
211211
instead of
212-
``https://github.com/googleapis/python-container/blob/master/CONTRIBUTING.rst``)
212+
``https://github.com/googleapis/python-container/blob/main/CONTRIBUTING.rst``)
213213
may cause problems creating links or rendering the description.
214214

215215
.. _description on PyPI: https://pypi.org/project/google-cloud-container
@@ -234,7 +234,7 @@ We support:
234234

235235
Supported versions can be found in our ``noxfile.py`` `config`_.
236236

237-
.. _config: https://github.com/googleapis/python-container/blob/master/noxfile.py
237+
.. _config: https://github.com/googleapis/python-container/blob/main/noxfile.py
238238

239239

240240
We also explicitly decided to support Python 3 beginning with version 3.6.

docs/conf.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@
7676
# The encoding of source files.
7777
# source_encoding = 'utf-8-sig'
7878

79-
# The master toctree document.
80-
master_doc = "index"
79+
# The root toctree document.
80+
root_doc = "index"
8181

8282
# General information about the project.
8383
project = "google-cloud-container"
@@ -280,7 +280,7 @@
280280
# author, documentclass [howto, manual, or own class]).
281281
latex_documents = [
282282
(
283-
master_doc,
283+
root_doc,
284284
"google-cloud-container.tex",
285285
"google-cloud-container Documentation",
286286
author,
@@ -315,7 +315,7 @@
315315
# (source start file, name, description, authors, manual section).
316316
man_pages = [
317317
(
318-
master_doc,
318+
root_doc,
319319
"google-cloud-container",
320320
"google-cloud-container Documentation",
321321
[author],
@@ -334,7 +334,7 @@
334334
# dir menu entry, description, category)
335335
texinfo_documents = [
336336
(
337-
master_doc,
337+
root_doc,
338338
"google-cloud-container",
339339
"google-cloud-container Documentation",
340340
author,

owlbot.py

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,60 @@
9999

100100
python.py_samples(skip_readmes=True)
101101

102+
# Remove the replacements below once https://github.com/googleapis/synthtool/pull/1188 is merged
103+
104+
# Update googleapis/repo-automation-bots repo to main in .kokoro/*.sh files
105+
s.replace(".kokoro/*.sh", "repo-automation-bots/tree/master", "repo-automation-bots/tree/main")
106+
107+
# Customize CONTRIBUTING.rst to replace master with main
108+
s.replace(
109+
"CONTRIBUTING.rst",
110+
"fetch and merge changes from upstream into master",
111+
"fetch and merge changes from upstream into main",
112+
)
113+
114+
s.replace(
115+
"CONTRIBUTING.rst",
116+
"git merge upstream/master",
117+
"git merge upstream/main",
118+
)
119+
120+
s.replace(
121+
"CONTRIBUTING.rst",
122+
"""export GOOGLE_CLOUD_TESTING_BRANCH=\"master\"""",
123+
"""export GOOGLE_CLOUD_TESTING_BRANCH=\"main\"""",
124+
)
125+
126+
s.replace(
127+
"CONTRIBUTING.rst",
128+
"remote \(``master``\)",
129+
"remote (``main``)",
130+
)
131+
132+
s.replace(
133+
"CONTRIBUTING.rst",
134+
"blob/master/CONTRIBUTING.rst",
135+
"blob/main/CONTRIBUTING.rst",
136+
)
137+
138+
s.replace(
139+
"CONTRIBUTING.rst",
140+
"blob/master/noxfile.py",
141+
"blob/main/noxfile.py",
142+
)
143+
144+
s.replace(
145+
"docs/conf.py",
146+
"master_doc",
147+
"root_doc",
148+
)
149+
150+
s.replace(
151+
"docs/conf.py",
152+
"# The master toctree document.",
153+
"# The root toctree document.",
154+
)
155+
102156
# TODO(busunkim): Use latest sphinx after microgenerator transition
103157
s.replace("noxfile.py", """['"]sphinx['"]""", '"sphinx<3.0.0"')
104158

0 commit comments

Comments
 (0)