chore: migrate default branch from master to main (#849)

diff --git a/.kokoro/test-samples-impl.sh b/.kokoro/test-samples-impl.sh
index 311a8d5..8a324c9 100755
--- a/.kokoro/test-samples-impl.sh
+++ b/.kokoro/test-samples-impl.sh
@@ -80,7 +80,7 @@
     EXIT=$?
 
     # If this is a periodic build, send the test log to the FlakyBot.
-    # See https://github.com/googleapis/repo-automation-bots/tree/master/packages/flakybot.
+    # See https://github.com/googleapis/repo-automation-bots/tree/main/packages/flakybot.
     if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then
       chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot
       $KOKORO_GFILE_DIR/linux_amd64/flakybot
diff --git a/README.rst b/README.rst
index 35ebe8b..6e67161 100644
--- a/README.rst
+++ b/README.rst
@@ -57,11 +57,11 @@
 
 See `CONTRIBUTING.rst`_ for more information on how to get started.
 
-.. _CONTRIBUTING.rst: https://github.com/googleapis/google-auth-library-python/blob/master/CONTRIBUTING.rst
+.. _CONTRIBUTING.rst: https://github.com/googleapis/google-auth-library-python/blob/main/CONTRIBUTING.rst
 
 License
 -------
 
 Apache 2.0 - See `the LICENSE`_ for more information.
 
-.. _the LICENSE: https://github.com/googleapis/google-auth-library-python/blob/master/LICENSE
+.. _the LICENSE: https://github.com/googleapis/google-auth-library-python/blob/main/LICENSE
diff --git a/docs/conf.py b/docs/conf.py
index b68467f..58e5b9a 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -53,8 +53,8 @@
 #
 # source_encoding = 'utf-8-sig'
 
-# The master toctree document.
-master_doc = "index"
+# The root toctree document.
+root_doc = "index"
 
 # General information about the project.
 project = "google-auth"
@@ -277,13 +277,7 @@
 # (source start file, target name, title,
 #  author, documentclass [howto, manual, or own class]).
 latex_documents = [
-    (
-        master_doc,
-        "google-auth.tex",
-        "google-auth Documentation",
-        "Google, Inc.",
-        "manual",
-    )
+    (root_doc, "google-auth.tex", "google-auth Documentation", "Google, Inc.", "manual")
 ]
 
 # The name of an image file (relative to this directory) to place at the top of
@@ -323,7 +317,7 @@
 
 # One entry per manual page. List of tuples
 # (source start file, name, description, authors, manual section).
-man_pages = [(master_doc, "google-auth", "google-auth Documentation", [author], 1)]
+man_pages = [(root_doc, "google-auth", "google-auth Documentation", [author], 1)]
 
 # If true, show URL addresses after external links.
 #
@@ -337,7 +331,7 @@
 #  dir menu entry, description, category)
 texinfo_documents = [
     (
-        master_doc,
+        root_doc,
         "google-auth",
         "google-auth Documentation",
         author,
diff --git a/docs/index.rst b/docs/index.rst
index 9544259..8a5f13a 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -62,7 +62,7 @@
 details, see `LICENSE`_
 
 .. _LICENSE:
-    https://github.com/GoogleCloudPlatform/google-auth-library-python/blob/master/LICENSE
+    https://github.com/GoogleCloudPlatform/google-auth-library-python/blob/main/LICENSE
 
 Contributing
 ------------
@@ -71,4 +71,4 @@
 for details.
 
 .. _contributing:
-    https://github.com/GoogleCloudPlatform/google-auth-library-python/blob/master/CONTRIBUTING.rst
+    https://github.com/GoogleCloudPlatform/google-auth-library-python/blob/main/CONTRIBUTING.rst
diff --git a/owlbot.py b/owlbot.py
index 58aa53a..61cf128 100644
--- a/owlbot.py
+++ b/owlbot.py
@@ -25,4 +25,9 @@
     'value: "docs"',
 )
 
+# Remove the replacement below once https://github.com/googleapis/synthtool/pull/1188 is merged
+
+# Update googleapis/repo-automation-bots repo to main in .kokoro/*.sh files
+assert 1 == s.replace(".kokoro/*.sh", "repo-automation-bots/tree/master", "repo-automation-bots/tree/main")
+
 s.shell.run(["nox", "-s", "blacken"], hide_output=False)