bazel: Set name from module_name

Bug: b/353713622
Change-Id: I2d63563d6be7fb713b88c524443c6db97403cf00
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/225832
Reviewed-by: Taylor Cramer <cramertj@google.com>
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Commit-Queue: Rob Mohr <mohrr@google.com>
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
diff --git a/recipe_modules/bazel/api.py b/recipe_modules/bazel/api.py
index 7c56ebb..83e490d 100644
--- a/recipe_modules/bazel/api.py
+++ b/recipe_modules/bazel/api.py
@@ -312,6 +312,8 @@
                     line.text,
                 ):
                     entry[match.group(1)] = match.group(2).strip('"')
+                    if match.group(1) == 'module_name' and 'name' not in entry:
+                        entry['name'] = match.group(2).strip('"')
 
             if entry:
                 results.append(entry)
diff --git a/recipe_modules/bazel/test_api.py b/recipe_modules/bazel/test_api.py
index 7f40d8b..265ce9b 100644
--- a/recipe_modules/bazel/test_api.py
+++ b/recipe_modules/bazel/test_api.py
@@ -27,7 +27,7 @@
 )
 
 git_repository(
-    name = "pigweed",
+    module_name = "pigweed",
     # ROLL: Multiple
     # ROLL: roll
     # ROLL: comment
diff --git a/recipe_modules/bazel/tests/retrieve_git_repository_attributes.expected/success.json b/recipe_modules/bazel/tests/retrieve_git_repository_attributes.expected/success.json
index ac569ba..f20a3bd 100644
--- a/recipe_modules/bazel/tests/retrieve_git_repository_attributes.expected/success.json
+++ b/recipe_modules/bazel/tests/retrieve_git_repository_attributes.expected/success.json
@@ -544,7 +544,7 @@
       "@@@STEP_LOG_LINE@WORKSPACE@)@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@git_repository(@@@",
-      "@@@STEP_LOG_LINE@WORKSPACE@    name = \"pigweed\",@@@",
+      "@@@STEP_LOG_LINE@WORKSPACE@    module_name = \"pigweed\",@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: Multiple@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: roll@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: comment@@@",
@@ -588,7 +588,7 @@
     "cmd": [],
     "name": "debug",
     "~followup_annotations": [
-      "@@@STEP_SUMMARY_TEXT@[{'commit': '1111111111111111111111111111111111111111', 'remote': 'https://pigweed.googlesource.com/pigweed/pigweed.git', 'git_repository_attribute_test': 'ignored', 'name': 'pigweed', 'strip_prefix': 'pw_toolchain_bazel'}]@@@"
+      "@@@STEP_SUMMARY_TEXT@[{'commit': '1111111111111111111111111111111111111111', 'remote': 'https://pigweed.googlesource.com/pigweed/pigweed.git', 'git_repository_attribute_test': 'ignored', 'module_name': 'pigweed', 'name': 'pigweed', 'strip_prefix': 'pw_toolchain_bazel'}]@@@"
     ]
   },
   {
@@ -621,6 +621,14 @@
   },
   {
     "cmd": [],
+    "name": "pigweed.module_name",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@",
+      "@@@STEP_SUMMARY_TEXT@pigweed@@@"
+    ]
+  },
+  {
+    "cmd": [],
     "name": "pigweed.strip_prefix",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
diff --git a/recipe_modules/bazel/tests/update_commit_hash.expected/equiv.json b/recipe_modules/bazel/tests/update_commit_hash.expected/equiv.json
index 67a05bf..95eb134 100644
--- a/recipe_modules/bazel/tests/update_commit_hash.expected/equiv.json
+++ b/recipe_modules/bazel/tests/update_commit_hash.expected/equiv.json
@@ -544,7 +544,7 @@
       "@@@STEP_LOG_LINE@WORKSPACE@)@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@git_repository(@@@",
-      "@@@STEP_LOG_LINE@WORKSPACE@    name = \"pigweed\",@@@",
+      "@@@STEP_LOG_LINE@WORKSPACE@    module_name = \"pigweed\",@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: Multiple@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: roll@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: comment@@@",
@@ -592,7 +592,7 @@
       "--json-output",
       "/path/to/tmp/json",
       "copy",
-      "git_repository(\n    name = \"other-repo\"\n    remote = \"https://pigweed.googlesource.com/other/repo.git\",\n    commit = \"invalid commit line won't be found\",\n)\n\ngit_repository(\n    name = \"pigweed\",\n    # ROLL: Warning: this entry is automatically updated.\n    # ROLL: Last updated 2012-05-14.\n    # ROLL: By https://cr-buildbucket.appspot.com/build/0.\n    commit = \"ffffffffffffffffffffffffffffffffffffffff\",\n    remote = \"https://pigweed.googlesource.com/pigweed/equiv\",\n    git_repository_attribute_test = \"ignored\",\n    strip_prefix = \"pw_toolchain_bazel\",\n)\n\ngit_repository(\n    name = \"missing final quote/comma so will miss this line\n    remote = \"https://pigweed.googlesource.com/third/repo.git\",\n    commit = \"2222222222222222222222222222222222222222\",\n)\n",
+      "git_repository(\n    name = \"other-repo\"\n    remote = \"https://pigweed.googlesource.com/other/repo.git\",\n    commit = \"invalid commit line won't be found\",\n)\n\ngit_repository(\n    module_name = \"pigweed\",\n    # ROLL: Warning: this entry is automatically updated.\n    # ROLL: Last updated 2012-05-14.\n    # ROLL: By https://cr-buildbucket.appspot.com/build/0.\n    commit = \"ffffffffffffffffffffffffffffffffffffffff\",\n    remote = \"https://pigweed.googlesource.com/pigweed/equiv\",\n    git_repository_attribute_test = \"ignored\",\n    strip_prefix = \"pw_toolchain_bazel\",\n)\n\ngit_repository(\n    name = \"missing final quote/comma so will miss this line\n    remote = \"https://pigweed.googlesource.com/third/repo.git\",\n    commit = \"2222222222222222222222222222222222222222\",\n)\n",
       "[START_DIR]/co/WORKSPACE"
     ],
     "infra_step": true,
@@ -605,7 +605,7 @@
       "@@@STEP_LOG_LINE@WORKSPACE@)@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@git_repository(@@@",
-      "@@@STEP_LOG_LINE@WORKSPACE@    name = \"pigweed\",@@@",
+      "@@@STEP_LOG_LINE@WORKSPACE@    module_name = \"pigweed\",@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: Warning: this entry is automatically updated.@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: Last updated 2012-05-14.@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: By https://cr-buildbucket.appspot.com/build/0.@@@",
diff --git a/recipe_modules/bazel/tests/update_commit_hash.expected/success.json b/recipe_modules/bazel/tests/update_commit_hash.expected/success.json
index 5aae314..d73479a 100644
--- a/recipe_modules/bazel/tests/update_commit_hash.expected/success.json
+++ b/recipe_modules/bazel/tests/update_commit_hash.expected/success.json
@@ -544,7 +544,7 @@
       "@@@STEP_LOG_LINE@WORKSPACE@)@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@git_repository(@@@",
-      "@@@STEP_LOG_LINE@WORKSPACE@    name = \"pigweed\",@@@",
+      "@@@STEP_LOG_LINE@WORKSPACE@    module_name = \"pigweed\",@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: Multiple@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: roll@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: comment@@@",
@@ -592,7 +592,7 @@
       "--json-output",
       "/path/to/tmp/json",
       "copy",
-      "git_repository(\n    name = \"other-repo\"\n    remote = \"https://pigweed.googlesource.com/other/repo.git\",\n    commit = \"invalid commit line won't be found\",\n)\n\ngit_repository(\n    name = \"pigweed\",\n    # ROLL: Warning: this entry is automatically updated.\n    # ROLL: Last updated 2012-05-14.\n    # ROLL: By https://cr-buildbucket.appspot.com/build/0.\n    commit = \"ffffffffffffffffffffffffffffffffffffffff\",\n    remote = \"https://pigweed.googlesource.com/pigweed/pigweed\",\n    git_repository_attribute_test = \"ignored\",\n    strip_prefix = \"pw_toolchain_bazel\",\n)\n\ngit_repository(\n    name = \"missing final quote/comma so will miss this line\n    remote = \"https://pigweed.googlesource.com/third/repo.git\",\n    commit = \"2222222222222222222222222222222222222222\",\n)\n",
+      "git_repository(\n    name = \"other-repo\"\n    remote = \"https://pigweed.googlesource.com/other/repo.git\",\n    commit = \"invalid commit line won't be found\",\n)\n\ngit_repository(\n    module_name = \"pigweed\",\n    # ROLL: Warning: this entry is automatically updated.\n    # ROLL: Last updated 2012-05-14.\n    # ROLL: By https://cr-buildbucket.appspot.com/build/0.\n    commit = \"ffffffffffffffffffffffffffffffffffffffff\",\n    remote = \"https://pigweed.googlesource.com/pigweed/pigweed\",\n    git_repository_attribute_test = \"ignored\",\n    strip_prefix = \"pw_toolchain_bazel\",\n)\n\ngit_repository(\n    name = \"missing final quote/comma so will miss this line\n    remote = \"https://pigweed.googlesource.com/third/repo.git\",\n    commit = \"2222222222222222222222222222222222222222\",\n)\n",
       "[START_DIR]/co/WORKSPACE"
     ],
     "infra_step": true,
@@ -605,7 +605,7 @@
       "@@@STEP_LOG_LINE@WORKSPACE@)@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@git_repository(@@@",
-      "@@@STEP_LOG_LINE@WORKSPACE@    name = \"pigweed\",@@@",
+      "@@@STEP_LOG_LINE@WORKSPACE@    module_name = \"pigweed\",@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: Warning: this entry is automatically updated.@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: Last updated 2012-05-14.@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: By https://cr-buildbucket.appspot.com/build/0.@@@",
diff --git a/recipe_modules/checkout/tests/workspace.expected/found.json b/recipe_modules/checkout/tests/workspace.expected/found.json
index 08fe45c..35485cb 100644
--- a/recipe_modules/checkout/tests/workspace.expected/found.json
+++ b/recipe_modules/checkout/tests/workspace.expected/found.json
@@ -1256,7 +1256,7 @@
       "@@@STEP_LOG_LINE@WORKSPACE@)@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@git_repository(@@@",
-      "@@@STEP_LOG_LINE@WORKSPACE@    name = \"pigweed\",@@@",
+      "@@@STEP_LOG_LINE@WORKSPACE@    module_name = \"pigweed\",@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: Multiple@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: roll@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: comment@@@",
diff --git a/recipe_modules/checkout/tests/workspace.expected/not-found.json b/recipe_modules/checkout/tests/workspace.expected/not-found.json
index 3bfacba..7cf5418 100644
--- a/recipe_modules/checkout/tests/workspace.expected/not-found.json
+++ b/recipe_modules/checkout/tests/workspace.expected/not-found.json
@@ -1256,7 +1256,7 @@
       "@@@STEP_LOG_LINE@WORKSPACE@)@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@git_repository(@@@",
-      "@@@STEP_LOG_LINE@WORKSPACE@    name = \"pigweed\",@@@",
+      "@@@STEP_LOG_LINE@WORKSPACE@    module_name = \"pigweed\",@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: Multiple@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: roll@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: comment@@@",
diff --git a/recipes/bazel_roller.expected/backwards.json b/recipes/bazel_roller.expected/backwards.json
index 33dab05..f843a04 100644
--- a/recipes/bazel_roller.expected/backwards.json
+++ b/recipes/bazel_roller.expected/backwards.json
@@ -1541,7 +1541,7 @@
       "@@@STEP_LOG_LINE@WORKSPACE@)@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@git_repository(@@@",
-      "@@@STEP_LOG_LINE@WORKSPACE@    name = \"pigweed\",@@@",
+      "@@@STEP_LOG_LINE@WORKSPACE@    module_name = \"pigweed\",@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: Multiple@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: roll@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: comment@@@",
@@ -1589,7 +1589,7 @@
       "--json-output",
       "/path/to/tmp/json",
       "copy",
-      "git_repository(\n    name = \"other-repo\"\n    remote = \"https://pigweed.googlesource.com/other/repo.git\",\n    commit = \"invalid commit line won't be found\",\n)\n\ngit_repository(\n    name = \"pigweed\",\n    # ROLL: Warning: this entry is automatically updated.\n    # ROLL: Last updated 2012-05-14.\n    # ROLL: By https://cr-buildbucket.appspot.com/build/0.\n    commit = \"2222222222222222222222222222222222222222\",\n    remote = \"https://pigweed.googlesource.com/pigweed/pigweed.git\",\n    git_repository_attribute_test = \"ignored\",\n    strip_prefix = \"pw_toolchain_bazel\",\n)\n\ngit_repository(\n    name = \"missing final quote/comma so will miss this line\n    remote = \"https://pigweed.googlesource.com/third/repo.git\",\n    commit = \"2222222222222222222222222222222222222222\",\n)\n",
+      "git_repository(\n    name = \"other-repo\"\n    remote = \"https://pigweed.googlesource.com/other/repo.git\",\n    commit = \"invalid commit line won't be found\",\n)\n\ngit_repository(\n    module_name = \"pigweed\",\n    # ROLL: Warning: this entry is automatically updated.\n    # ROLL: Last updated 2012-05-14.\n    # ROLL: By https://cr-buildbucket.appspot.com/build/0.\n    commit = \"2222222222222222222222222222222222222222\",\n    remote = \"https://pigweed.googlesource.com/pigweed/pigweed.git\",\n    git_repository_attribute_test = \"ignored\",\n    strip_prefix = \"pw_toolchain_bazel\",\n)\n\ngit_repository(\n    name = \"missing final quote/comma so will miss this line\n    remote = \"https://pigweed.googlesource.com/third/repo.git\",\n    commit = \"2222222222222222222222222222222222222222\",\n)\n",
       "[START_DIR]/co/WORKSPACE"
     ],
     "infra_step": true,
@@ -1602,7 +1602,7 @@
       "@@@STEP_LOG_LINE@WORKSPACE@)@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@git_repository(@@@",
-      "@@@STEP_LOG_LINE@WORKSPACE@    name = \"pigweed\",@@@",
+      "@@@STEP_LOG_LINE@WORKSPACE@    module_name = \"pigweed\",@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: Warning: this entry is automatically updated.@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: Last updated 2012-05-14.@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: By https://cr-buildbucket.appspot.com/build/0.@@@",
diff --git a/recipes/bazel_roller.expected/no-trigger.json b/recipes/bazel_roller.expected/no-trigger.json
index ce916a2..255da35 100644
--- a/recipes/bazel_roller.expected/no-trigger.json
+++ b/recipes/bazel_roller.expected/no-trigger.json
@@ -1541,7 +1541,7 @@
       "@@@STEP_LOG_LINE@WORKSPACE@)@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@git_repository(@@@",
-      "@@@STEP_LOG_LINE@WORKSPACE@    name = \"pigweed\",@@@",
+      "@@@STEP_LOG_LINE@WORKSPACE@    module_name = \"pigweed\",@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: Multiple@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: roll@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: comment@@@",
@@ -1589,7 +1589,7 @@
       "--json-output",
       "/path/to/tmp/json",
       "copy",
-      "git_repository(\n    name = \"other-repo\"\n    remote = \"https://pigweed.googlesource.com/other/repo.git\",\n    commit = \"invalid commit line won't be found\",\n)\n\ngit_repository(\n    name = \"pigweed\",\n    # ROLL: Warning: this entry is automatically updated.\n    # ROLL: Last updated 2012-05-14.\n    # ROLL: By https://cr-buildbucket.appspot.com/build/0.\n    commit = \"2222222222222222222222222222222222222222\",\n    remote = \"https://pigweed.googlesource.com/pigweed/pigweed.git\",\n    git_repository_attribute_test = \"ignored\",\n    strip_prefix = \"pw_toolchain_bazel\",\n)\n\ngit_repository(\n    name = \"missing final quote/comma so will miss this line\n    remote = \"https://pigweed.googlesource.com/third/repo.git\",\n    commit = \"2222222222222222222222222222222222222222\",\n)\n",
+      "git_repository(\n    name = \"other-repo\"\n    remote = \"https://pigweed.googlesource.com/other/repo.git\",\n    commit = \"invalid commit line won't be found\",\n)\n\ngit_repository(\n    module_name = \"pigweed\",\n    # ROLL: Warning: this entry is automatically updated.\n    # ROLL: Last updated 2012-05-14.\n    # ROLL: By https://cr-buildbucket.appspot.com/build/0.\n    commit = \"2222222222222222222222222222222222222222\",\n    remote = \"https://pigweed.googlesource.com/pigweed/pigweed.git\",\n    git_repository_attribute_test = \"ignored\",\n    strip_prefix = \"pw_toolchain_bazel\",\n)\n\ngit_repository(\n    name = \"missing final quote/comma so will miss this line\n    remote = \"https://pigweed.googlesource.com/third/repo.git\",\n    commit = \"2222222222222222222222222222222222222222\",\n)\n",
       "[START_DIR]/co/WORKSPACE"
     ],
     "infra_step": true,
@@ -1602,7 +1602,7 @@
       "@@@STEP_LOG_LINE@WORKSPACE@)@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@git_repository(@@@",
-      "@@@STEP_LOG_LINE@WORKSPACE@    name = \"pigweed\",@@@",
+      "@@@STEP_LOG_LINE@WORKSPACE@    module_name = \"pigweed\",@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: Warning: this entry is automatically updated.@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: Last updated 2012-05-14.@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: By https://cr-buildbucket.appspot.com/build/0.@@@",
diff --git a/recipes/bazel_roller.expected/success.json b/recipes/bazel_roller.expected/success.json
index cfe7f6a..35b435c 100644
--- a/recipes/bazel_roller.expected/success.json
+++ b/recipes/bazel_roller.expected/success.json
@@ -1810,7 +1810,7 @@
       "@@@STEP_LOG_LINE@WORKSPACE@)@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@git_repository(@@@",
-      "@@@STEP_LOG_LINE@WORKSPACE@    name = \"pigweed\",@@@",
+      "@@@STEP_LOG_LINE@WORKSPACE@    module_name = \"pigweed\",@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: Multiple@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: roll@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: comment@@@",
@@ -1858,7 +1858,7 @@
       "--json-output",
       "/path/to/tmp/json",
       "copy",
-      "git_repository(\n    name = \"other-repo\"\n    remote = \"https://pigweed.googlesource.com/other/repo.git\",\n    commit = \"invalid commit line won't be found\",\n)\n\ngit_repository(\n    name = \"pigweed\",\n    # ROLL: Warning: this entry is automatically updated.\n    # ROLL: Last updated 2012-05-14.\n    # ROLL: By https://cr-buildbucket.appspot.com/build/8945511751514863184.\n    commit = \"2d72510e447ab60a9728aeea2362d8be2cbd7789\",\n    remote = \"https://pigweed.googlesource.com/pigweed/pigweed.git\",\n    git_repository_attribute_test = \"ignored\",\n    strip_prefix = \"pw_toolchain_bazel\",\n)\n\ngit_repository(\n    name = \"missing final quote/comma so will miss this line\n    remote = \"https://pigweed.googlesource.com/third/repo.git\",\n    commit = \"2222222222222222222222222222222222222222\",\n)\n",
+      "git_repository(\n    name = \"other-repo\"\n    remote = \"https://pigweed.googlesource.com/other/repo.git\",\n    commit = \"invalid commit line won't be found\",\n)\n\ngit_repository(\n    module_name = \"pigweed\",\n    # ROLL: Warning: this entry is automatically updated.\n    # ROLL: Last updated 2012-05-14.\n    # ROLL: By https://cr-buildbucket.appspot.com/build/8945511751514863184.\n    commit = \"2d72510e447ab60a9728aeea2362d8be2cbd7789\",\n    remote = \"https://pigweed.googlesource.com/pigweed/pigweed.git\",\n    git_repository_attribute_test = \"ignored\",\n    strip_prefix = \"pw_toolchain_bazel\",\n)\n\ngit_repository(\n    name = \"missing final quote/comma so will miss this line\n    remote = \"https://pigweed.googlesource.com/third/repo.git\",\n    commit = \"2222222222222222222222222222222222222222\",\n)\n",
       "[START_DIR]/co/WORKSPACE"
     ],
     "infra_step": true,
@@ -1883,7 +1883,7 @@
       "@@@STEP_LOG_LINE@WORKSPACE@)@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@git_repository(@@@",
-      "@@@STEP_LOG_LINE@WORKSPACE@    name = \"pigweed\",@@@",
+      "@@@STEP_LOG_LINE@WORKSPACE@    module_name = \"pigweed\",@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: Warning: this entry is automatically updated.@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: Last updated 2012-05-14.@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: By https://cr-buildbucket.appspot.com/build/8945511751514863184.@@@",
diff --git a/recipes/bazel_roller.expected/unrecognized-remote.json b/recipes/bazel_roller.expected/unrecognized-remote.json
index db04dc4..f30e174 100644
--- a/recipes/bazel_roller.expected/unrecognized-remote.json
+++ b/recipes/bazel_roller.expected/unrecognized-remote.json
@@ -2426,7 +2426,7 @@
       "@@@STEP_LOG_LINE@WORKSPACE@)@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@git_repository(@@@",
-      "@@@STEP_LOG_LINE@WORKSPACE@    name = \"pigweed\",@@@",
+      "@@@STEP_LOG_LINE@WORKSPACE@    module_name = \"pigweed\",@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: Multiple@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: roll@@@",
       "@@@STEP_LOG_LINE@WORKSPACE@    # ROLL: comment@@@",