Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Commit

Permalink
chore(python): rename default branch to main (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
gcf-owl-bot[bot] committed Sep 1, 2021
1 parent bd4fb14 commit f48a13f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 57 deletions.
2 changes: 1 addition & 1 deletion .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
docker:
image: gcr.io/repo-automation-bots/owlbot-python:latest
digest: sha256:1456ea2b3b523ccff5e13030acef56d1de28f21249c62aa0f196265880338fa7
digest: sha256:0ffe3bdd6c7159692df5f7744da74e5ef19966288a6bf76023e8e04e0c424d7d
6 changes: 3 additions & 3 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ Coding Style
export GOOGLE_CLOUD_TESTING_BRANCH="main"

By doing this, you are specifying the location of the most up-to-date
version of ``python-service-usage``. The the suggested remote name ``upstream``
should point to the official ``googleapis`` checkout and the
the branch should be the main branch on that remote (``main``).
version of ``python-service-usage``. The
remote name ``upstream`` should point to the official ``googleapis``
checkout and the branch should be the default branch on that remote (``main``).

- This repository contains configuration for the
`pre-commit <https://pre-commit.com/>`__ tool, which automates checking
Expand Down
55 changes: 2 additions & 53 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,61 +55,10 @@
# ----------------------------------------------------------------------------

templated_files = gcp.CommonTemplates().py_library(microgenerator=True)
python.py_samples(skip_readmes=True)
s.move(templated_files, excludes=[".coveragerc"]) # the microgenerator has a good coveragerc file
# Remove the replacements below once https://github.com/googleapis/synthtool/pull/1188 is merged

# Update googleapis/repo-automation-bots repo to main in .kokoro/*.sh files
s.replace(".kokoro/*.sh", "repo-automation-bots/tree/master", "repo-automation-bots/tree/main")

# Customize CONTRIBUTING.rst to replace master with main
s.replace(
"CONTRIBUTING.rst",
"fetch and merge changes from upstream into master",
"fetch and merge changes from upstream into main",
)

s.replace(
"CONTRIBUTING.rst",
"git merge upstream/master",
"git merge upstream/main",
)

s.replace(
"CONTRIBUTING.rst",
"""export GOOGLE_CLOUD_TESTING_BRANCH=\"master\"""",
"""export GOOGLE_CLOUD_TESTING_BRANCH=\"main\"""",
)

s.replace(
"CONTRIBUTING.rst",
"remote \(``master``\)",
"remote (``main``)",
)

s.replace(
"CONTRIBUTING.rst",
"blob/master/CONTRIBUTING.rst",
"blob/main/CONTRIBUTING.rst",
)

s.replace(
"CONTRIBUTING.rst",
"blob/master/noxfile.py",
"blob/main/noxfile.py",
)

s.replace(
"docs/conf.py",
"master_doc",
"root_doc",
)
s.move(templated_files, excludes=[".coveragerc"]) # the microgenerator has a good coveragerc file

s.replace(
"docs/conf.py",
"# The master toctree document.",
"# The root toctree document.",
)
python.py_samples(skip_readmes=True)

# ----------------------------------------------------------------------------
# Run blacken session
Expand Down

0 comments on commit f48a13f

Please sign in to comment.