update various Gitiles/GH URLs to use HEAD for the branch

BUG=chromium:1126855
TEST=CQ passes

Change-Id: I649344ade5384273b618248eaa1fc08fe50d6d3d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/2702192
Tested-by: Mike Frysinger <vapier@chromium.org>
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Commit-Queue: LaMont Jones <lamontjones@chromium.org>
Reviewed-by: LaMont Jones <lamontjones@chromium.org>
diff --git a/cli/cros/README.cros_moblabvm.md b/cli/cros/README.cros_moblabvm.md
index 974d129..3b2c29d 100644
--- a/cli/cros/README.cros_moblabvm.md
+++ b/cli/cros/README.cros_moblabvm.md
@@ -258,7 +258,7 @@
 
 This setup is especially useful for iterating on most pieces of the autotest
 infrastructure code, instead of using
-[local_dev_autotest](https://chromium.googlesource.com/chromiumos/third_party/autotest/+/master/site_utils/setup_dev_autotest.sh)
+[local_dev_autotest](https://chromium.googlesource.com/chromiumos/third_party/autotest/+/HEAD/site_utils/setup_dev_autotest.sh)
 to install the full autotest stack on your workstation, as we've done in the
 past.
 
@@ -330,4 +330,4 @@
 
 [moblab-generic-vm-paladin builder]: https://cros-goldeneye.corp.google.com/chromeos/legoland/builderHistory?buildConfig=moblab-generic-vm-paladin&buildBranch=master
 [betty paladin builder]: https://cros-goldeneye.corp.google.com/chromeos/legoland/builderHistory?buildConfig=betty-paladin&buildBranch=master
-[moblab_RunSuite]: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/master/server/site_tests/moblab_RunSuite/
+[moblab_RunSuite]: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/HEAD/server/site_tests/moblab_RunSuite/
diff --git a/config/chromeos_config.py b/config/chromeos_config.py
index bfbb775..4ebf7f0 100644
--- a/config/chromeos_config.py
+++ b/config/chromeos_config.py
@@ -3075,6 +3075,7 @@
   Returns:
     List of config_lib.BuildConfig instances.
   """
+  # https://github.com/luci/luci-go/blob/HEAD/scheduler/appengine/messages/config.proto
   #
   # Define each branched schedule with:
   #   branch_name: Name of the branch to build as a string.
@@ -3085,9 +3086,6 @@
   #     Cron style in UTC timezone: '0 15 * * *'
   #     'with 30d interval' to run X time after previous build.
   #
-  #     https://github.com/luci/luci-go/blob/master/scheduler/
-  #                        appengine/messages/config.proto
-  #
   # When updating this be sure to run `config/refresh_generated_files`
   # or the change will fail chromite unittests.
   branch_builds = [
diff --git a/config/chromeos_config_unittest.py b/config/chromeos_config_unittest.py
index c30ae24..3562864 100644
--- a/config/chromeos_config_unittest.py
+++ b/config/chromeos_config_unittest.py
@@ -27,11 +27,6 @@
 
 # pylint: disable=protected-access
 
-CHROMIUM_WATCHING_URL = (
-    'http://src.chromium.org/chrome/trunk/tools/build/masters/'
-    'master.chromium.chromiumos/master_chromiumos_cros_cfg.py'
-)
-
 
 class ChromeosConfigTestBase(cros_test_lib.TestCase):
   """Base class for tests of chromeos_config.."""
diff --git a/config/luci-scheduler.cfg b/config/luci-scheduler.cfg
index c111190..9ee5297 100644
--- a/config/luci-scheduler.cfg
+++ b/config/luci-scheduler.cfg
@@ -1,7 +1,7 @@
 # Defines buckets on luci-scheduler.appspot.com.
 #
 # For schema of this file and documentation see ProjectConfig message in
-# https://github.com/luci/luci-go/blob/master/scheduler/appengine/messages/config.proto
+# https://github.com/luci/luci-go/blob/HEAD/scheduler/appengine/messages/config.proto
 
 # Generated with chromite/scripts/gen_luci_scheduler
 
diff --git a/lib/buildbucket_lib.py b/lib/buildbucket_lib.py
index 33cad6e..2ca23ef 100644
--- a/lib/buildbucket_lib.py
+++ b/lib/buildbucket_lib.py
@@ -10,8 +10,7 @@
 can lease it, build it and report a result back.
 
 For more documents about buildbucket, please refer to:
-'https://chromium.googlesource.com/infra/infra/+/master/appengine/
-cr-buildbucket/README.md'
+https://chromium.googlesource.com/infra/infra/+/HEAD/appengine/cr-buildbucket/README.md'
 """
 
 from __future__ import print_function
diff --git a/lib/buildbucket_v2.py b/lib/buildbucket_v2.py
index 6a0aaf2..958940a 100644
--- a/lib/buildbucket_v2.py
+++ b/lib/buildbucket_v2.py
@@ -42,7 +42,7 @@
 BB_STATUS_DICT = {
     # A mapping of Buildbucket V2 statuses to chromite's statuses. For
     # buildbucket reference, see here:
-    # https://chromium.googlesource.com/infra/luci/luci-go/+/master/buildbucket/proto/common.proto
+    # https://chromium.googlesource.com/infra/luci/luci-go/+/HEAD/buildbucket/proto/common.proto
     0: 'unspecified',
     1: constants.BUILDER_STATUS_PLANNED,
     2: constants.BUILDER_STATUS_INFLIGHT,
@@ -180,7 +180,7 @@
   """Extract information from a Buildbucket Step instance.
 
   Reference:
-  https://chromium.googlesource.com/infra/luci/luci-go/+/master/buildbucket/proto/step.proto
+  https://chromium.googlesource.com/infra/luci/luci-go/+/HEAD/buildbucket/proto/step.proto
 
   Args:
     step: A step_pb2.Step instance from Buildbucket to be extracted.
@@ -254,7 +254,7 @@
 
     Returns:
       The corresponding BatchResponse message. See here:
-      https://chromium.googlesource.com/infra/luci/luci-go/+/master/buildbucket/proto/builds_service.proto
+      https://chromium.googlesource.com/infra/luci/luci-go/+/HEAD/buildbucket/proto/builds_service.proto
     """
     batch_requests = []
     for buildbucket_id in buildbucket_ids:
@@ -279,7 +279,7 @@
 
     Returns:
       The corresponding BatchResponse message. See here:
-      https://chromium.googlesource.com/infra/luci/luci-go/+/master/buildbucket/proto/builds_service.proto
+      https://chromium.googlesource.com/infra/luci/luci-go/+/HEAD/buildbucket/proto/builds_service.proto
     """
     batch_requests = []
     for buildbucket_id in buildbucket_ids:
@@ -304,7 +304,7 @@
 
     Returns:
       The corresponding Build proto. See here:
-      https://chromium.googlesource.com/infra/luci/luci-go/+/master/buildbucket/proto/build.proto
+      https://chromium.googlesource.com/infra/luci/luci-go/+/HEAD/buildbucket/proto/build.proto
     """
     cancel_build_request = rpc_pb2.CancelBuildRequest(
          id=buildbucket_id,
@@ -327,7 +327,7 @@
 
     Returns:
       The corresponding Build proto. See here:
-      https://chromium.googlesource.com/infra/luci/luci-go/+/master/buildbucket/proto/build.proto
+      https://chromium.googlesource.com/infra/luci/luci-go/+/HEAD/buildbucket/proto/build.proto
     """
     get_build_request = rpc_pb2.GetBuildRequest(
         id=buildbucket_id,
@@ -360,7 +360,7 @@
 
     Returns:
       The corresponding Build proto. See here:
-      https://chromium.googlesource.com/infra/luci/luci-go/+/master/buildbucket/proto/build.proto
+      https://chromium.googlesource.com/infra/luci/luci-go/+/HEAD/buildbucket/proto/build.proto
     """
     schedule_build_request = rpc_pb2.ScheduleBuildRequest(
         request_id=request_id,
@@ -389,7 +389,7 @@
 
     Returns:
       The corresponding Build proto. See here:
-      https://chromium.googlesource.com/infra/luci/luci-go/+/master/buildbucket/proto/build.proto
+      https://chromium.googlesource.com/infra/luci/luci-go/+/HEAD/buildbucket/proto/build.proto
     """
     update_build_request = rpc_pb2.UpdateBuildRequest(
         build=build,
diff --git a/lib/dlc_lib.py b/lib/dlc_lib.py
index 86209b1..8c5e5c3 100644
--- a/lib/dlc_lib.py
+++ b/lib/dlc_lib.py
@@ -669,7 +669,7 @@
     - Maximum length of 40 (_MAX_ID_NAME) characters.
 
   For more info see:
-  https://chromium.googlesource.com/chromiumos/platform2/+/master/dlcservice/docs/developer.md#create-a-dlc-module
+  https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/dlcservice/docs/developer.md#create-a-dlc-module
 
   Args:
     name: The value of the string to be validated.
diff --git a/lib/repo_manifest.py b/lib/repo_manifest.py
index 9e26f43..2f47d13 100644
--- a/lib/repo_manifest.py
+++ b/lib/repo_manifest.py
@@ -41,7 +41,7 @@
 class Manifest(object):
   """Manifest represents the contents of a repo manifest XML file."""
 
-  # https://chromium.googlesource.com/external/repo/+/master/docs/manifest-format.md
+  # https://chromium.googlesource.com/external/repo/+/HEAD/docs/manifest-format.md
 
   def __init__(self, etree, allow_unsupported_features=False):
     """Initialize Manifest.
diff --git a/scripts/cros_fuzz.py b/scripts/cros_fuzz.py
index 70395fd..4492a20 100644
--- a/scripts/cros_fuzz.py
+++ b/scripts/cros_fuzz.py
@@ -724,7 +724,7 @@
   except gs.GSCommandError as exception:
     logging.error(
         'gsutil failed to download the corpus. You may need to log in. See:\n'
-        'https://chromium.googlesource.com/chromiumos/docs/+/master/gsutil.md'
+        'https://chromium.googlesource.com/chromiumos/docs/+/HEAD/gsutil.md'
         '#setup\n'
         'for instructions on doing this.')
     raise exception
diff --git a/scripts/gen_luci_scheduler.py b/scripts/gen_luci_scheduler.py
index b44fd8a..ba95c7e 100644
--- a/scripts/gen_luci_scheduler.py
+++ b/scripts/gen_luci_scheduler.py
@@ -36,7 +36,7 @@
 _CONFIG_HEADER = """# Defines buckets on luci-scheduler.appspot.com.
 #
 # For schema of this file and documentation see ProjectConfig message in
-# https://github.com/luci/luci-go/blob/master/scheduler/appengine/messages/config.proto
+# https://github.com/luci/luci-go/blob/HEAD/scheduler/appengine/messages/config.proto
 
 # Generated with chromite/scripts/gen_luci_scheduler
 
diff --git a/scripts/gen_luci_scheduler_unittest.py b/scripts/gen_luci_scheduler_unittest.py
index 4220da0..f40d0e4 100644
--- a/scripts/gen_luci_scheduler_unittest.py
+++ b/scripts/gen_luci_scheduler_unittest.py
@@ -289,7 +289,7 @@
     expected = """# Defines buckets on luci-scheduler.appspot.com.
 #
 # For schema of this file and documentation see ProjectConfig message in
-# https://github.com/luci/luci-go/blob/master/scheduler/appengine/messages/config.proto
+# https://github.com/luci/luci-go/blob/HEAD/scheduler/appengine/messages/config.proto
 
 # Generated with chromite/scripts/gen_luci_scheduler
 
diff --git a/third_party/gn_helpers/README.chromium b/third_party/gn_helpers/README.chromium
index 6abc258..cf116b3 100644
--- a/third_party/gn_helpers/README.chromium
+++ b/third_party/gn_helpers/README.chromium
@@ -1,6 +1,6 @@
 Name: GN helpers
 Short Name: gn_helpers
-URL: https://chromium.googlesource.com/chromium/src/+/master/build/gn_helpers.py
+URL: https://chromium.googlesource.com/chromium/src/+/HEAD/build/gn_helpers.py
 Version: 0
 Revision: b75f8eca53df514c5b9ff8ee3252793a32da92e3
 License: BSD
diff --git a/third_party/oauth2client/README.md b/third_party/oauth2client/README.md
index 005aff5..c32c609 100644
--- a/third_party/oauth2client/README.md
+++ b/third_party/oauth2client/README.md
@@ -25,5 +25,5 @@
 
 We support Python 2.6, 2.7, 3.3+. More information [in the docs][2].
 
-[1]: https://github.com/google/oauth2client/blob/master/CONTRIBUTING.md
+[1]: https://github.com/google/oauth2client/blob/HEAD/CONTRIBUTING.md
 [2]: http://oauth2client.readthedocs.org/#supported-python-versions