Skip to content

Commit 31e24e2

Browse files
chore: migrate to main branch (googleapis#372)
* docs: migrate to main branch * chore: update changelog * fix: revert some owlbot changes * chore: revert owlbot * chore: update owlbot * chore: update owlbot * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: update owlbot * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 8429485 commit 31e24e2

File tree

10 files changed

+111
-55
lines changed

10 files changed

+111
-55
lines changed

.github/sync-repo-settings.yaml

+4-4
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

+1-1
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

+1-1
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141

142142
### ⚠ BREAKING CHANGES
143143

144-
* use microgenerator. See [Migration Guide](https://github.com/googleapis/python-dialogflow/blob/master/UPGRADING.md). (#239)
144+
* use microgenerator. See [Migration Guide](https://github.com/googleapis/python-dialogflow/blob/main/UPGRADING.md). (#239)
145145

146146
### Features
147147

CONTRIBUTING.rst

+6-6
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-dialogflow
5151
# repository into your local repository.
5252
$ git remote add upstream [email protected]:googleapis/python-dialogflow.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-dialogflow``. 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-dialogflow/blob/master/CONTRIBUTING.rst``)
212+
``https://github.com/googleapis/python-dialogflow/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-dialogflow
@@ -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-dialogflow/blob/master/noxfile.py
237+
.. _config: https://github.com/googleapis/python-dialogflow/blob/main/noxfile.py
238238

239239

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

README.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ More Information: `Google Cloud Python Library Support <https://github.com/googl
8282
Contributing
8383
------------
8484

85-
Contributions welcome! See the `Contributing Guide <https://github.com/googleapis/python-dialogflow/blob/master/.github/CONTRIBUTING.md>`_.
85+
Contributions welcome! See the `Contributing Guide <https://github.com/googleapis/python-dialogflow/blob/main/.github/CONTRIBUTING.md>`_.
8686

8787
License
8888
-------
8989

9090
Apache Version 2.0
9191

92-
See `the LICENSE file <https://github.com/googleapis/python-dialogflow/blob/master/LICENSE>`_ for more information.
92+
See `the LICENSE file <https://github.com/googleapis/python-dialogflow/blob/main/LICENSE>`_ for more information.

UPGRADING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -248,4 +248,4 @@ session_path = f"projects/{project}/agent/sessions/{session}"
248248

249249
# SessionsClient
250250
environment_session_path = f"projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}"
251-
```
251+
```

docs/conf.py

+5-5
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 main toctree document.
80+
root_doc = "index"
8181

8282
# General information about the project.
8383
project = "google-cloud-dialogflow"
@@ -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-dialogflow.tex",
285285
"google-cloud-dialogflow 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-dialogflow",
320320
"google-cloud-dialogflow 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-dialogflow",
339339
"google-cloud-dialogflow Documentation",
340340
author,

owlbot.py

+44-2
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,15 @@
3838
# # Add templated files
3939
# # ----------------------------------------------------------------------------
4040
templated_files = common.py_library(
41-
python.py_samples(skip_readmes=True)
4241
samples=False, # set to True only if there are samples
4342
microgenerator=True,
4443
cov_level=98,
4544

4645
)
4746
s.move(templated_files, excludes=[".coveragerc"]) # microgenerator has a good .coveragerc file
4847

48+
python.py_samples(skip_readmes=True)
49+
4950
# Don't treat warnings as errors
5051
# Docstrings have unexpected idnentation and block quote formatting issues
5152
s.replace(
@@ -54,4 +55,45 @@
5455
"",
5556
)
5657

57-
s.shell.run(["nox", "-s", "blacken"], hide_output=False)
58+
s.shell.run(["nox", "-s", "blacken"], hide_output=False)
59+
60+
# ----------------------------------------------------------------------------
61+
# Main Branch migration
62+
# ----------------------------------------------------------------------------
63+
64+
s.replace(
65+
"*.rst",
66+
"master",
67+
"main"
68+
)
69+
70+
s.replace(
71+
"CONTRIBUTING.rst",
72+
"kubernetes/community/blob/main",
73+
"kubernetes/community/blob/master"
74+
)
75+
76+
s.replace(
77+
"docs/conf.py",
78+
"master",
79+
"main"
80+
)
81+
82+
s.replace(
83+
"docs/conf.py",
84+
"main_doc",
85+
"root_doc"
86+
)
87+
88+
s.replace(
89+
".kokoro/*",
90+
"master",
91+
"main"
92+
)
93+
94+
s.replace(
95+
"README.rst",
96+
"google-cloud-python/blob/main/README.rst",
97+
"google-cloud-python/blob/master/README.rst"
98+
)
99+

0 commit comments

Comments
 (0)