static_checks: Change docs to use Docs-Not-Needed
Bug: b/365581180
Change-Id: I1984c4fd93e1e23f972c97df42aa296fbb2949a8
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/234872
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Commit-Queue: Rob Mohr <mohrr@google.com>
Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ted Pudlik <tpudlik@google.com>
diff --git a/recipes/static_checks.expected/docs.commit-message-ignored.json b/recipes/static_checks.expected/docs.commit-message-ignored.json
index 17fdcf4..1abe348 100644
--- a/recipes/static_checks.expected/docs.commit-message-ignored.json
+++ b/recipes/static_checks.expected/docs.commit-message-ignored.json
@@ -268,7 +268,7 @@
{
"failure": {
"failure": {},
- "humanReason": "Found \"No-Docs-Update-Reason:\" in the commit message which is no longer allowed. Please use a Gerrit comment instead (i.e., click \"Reply\" in the Gerrit UI)."
+ "humanReason": "Found \"No-Docs-Update-Reason:\" in the commit message which is no longer allowed. Please vote on the \"Docs-Not-Needed\" label instead."
},
"name": "$result"
}
diff --git a/recipes/static_checks.py b/recipes/static_checks.py
index 59fc459..091aaf4 100644
--- a/recipes/static_checks.py
+++ b/recipes/static_checks.py
@@ -63,8 +63,7 @@
"""Check that docs are included in the CL.
If doc_patterns is set make sure at least one document change is in
- the CL. Can be overridden by adding "No-Docs-Update-Reason:" to the commit
- message, a Gerrit comment, or a patchset description.
+ the CL. Can be overridden by voting on the "Docs-Not-Needed" label.
"""
if not doc_patterns:
with api.step.nest('doc changes not required'):
@@ -73,8 +72,8 @@
if 'no-docs-update-reason:' in commit_message.lower():
raise api.step.StepFailure(
'Found "No-Docs-Update-Reason:" in the commit message which is no '
- 'longer allowed. Please use a Gerrit comment instead (i.e., click '
- '"Reply" in the Gerrit UI).'
+ 'longer allowed. Please vote on the "Docs-Not-Needed" label '
+ 'instead.'
)
match: re.Match = api.util.find_matching_comment(