Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Commit 1a44868

Browse filesBrowse files
committed
docs: migrate default branch from master to main
1 parent 232546b commit 1a44868
Copy full SHA for 1a44868

File tree

Expand file treeCollapse file tree

4 files changed

+55
-8
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+55
-8
lines changed

‎.kokoro/build.sh

Copy file name to clipboardExpand all lines: .kokoro/build.sh
+1-1Lines 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

Copy file name to clipboardExpand all lines: .kokoro/test-samples-impl.sh
+1-1Lines 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

Copy file name to clipboardExpand all lines: CONTRIBUTING.rst
+6-6Lines 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-source-context
5151
# repository into your local repository.
5252
$ git remote add upstream git@github.com:googleapis/python-source-context.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-source-context``. 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-source-context/blob/master/CONTRIBUTING.rst``)
212+
``https://github.com/googleapis/python-source-context/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-source-context
@@ -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-source-context/blob/master/noxfile.py
237+
.. _config: https://github.com/googleapis/python-source-context/blob/main/noxfile.py
238238

239239

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

‎owlbot.py

Copy file name to clipboardExpand all lines: owlbot.py
+47Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,53 @@
3333
templated_files = gcp.CommonTemplates().py_library(microgenerator=True)
3434
python.py_samples(skip_readmes=True)
3535
s.move(templated_files, excludes=[".coveragerc"]) # the microgenerator has a good coveragerc file
36+
# Remove the replacements below once https://github.com/googleapis/synthtool/pull/1188 is merged
37+
38+
# Update googleapis/repo-automation-bots repo to main in .kokoro/*.sh files
39+
s.replace(".kokoro/*.sh", "repo-automation-bots/tree/master", "repo-automation-bots/tree/main")
40+
41+
# Customize CONTRIBUTING.rst to replace master with main
42+
s.replace(
43+
"CONTRIBUTING.rst",
44+
"fetch and merge changes from upstream into master",
45+
"fetch and merge changes from upstream into main",
46+
)
47+
48+
s.replace(
49+
"CONTRIBUTING.rst",
50+
"git merge upstream/master",
51+
"git merge upstream/main",
52+
)
53+
54+
s.replace(
55+
"CONTRIBUTING.rst",
56+
"""export GOOGLE_CLOUD_TESTING_BRANCH=\"master\"""",
57+
"""export GOOGLE_CLOUD_TESTING_BRANCH=\"main\"""",
58+
)
59+
60+
s.replace(
61+
"CONTRIBUTING.rst",
62+
"remote \(``master``\)",
63+
"remote (``main``)",
64+
)
65+
66+
s.replace(
67+
"CONTRIBUTING.rst",
68+
"blob/master/CONTRIBUTING.rst",
69+
"blob/main/CONTRIBUTING.rst",
70+
)
71+
72+
s.replace(
73+
"CONTRIBUTING.rst",
74+
"blob/master/noxfile.py",
75+
"blob/main/noxfile.py",
76+
)
77+
78+
s.replace(
79+
"docs/conf.py",
80+
"master_doc",
81+
"root_doc",
82+
)
3683

3784
# ----------------------------------------------------------------------------
3885
# Run blacken session

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.