aboutsummaryrefslogtreecommitdiffhomepage
path: root/PRESUBMIT.py
diff options
context:
space:
mode:
authorGravatar Ravi Mistry <rmistry@google.com>2017-12-07 11:10:11 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-07 16:19:39 +0000
commitb5e2acc413ff60e99ef5ba952b10acf67c78ec87 (patch)
tree1dc1e6d851fb8f6922b3354e3c4d007f12d1e55b /PRESUBMIT.py
parent5cf6d32e80af62c39b1068d066024f5124cb8487 (diff)
Skip PostUploadHooks for all auto commit bots
NoTry: true Bug: skia:7310 Change-Id: Ib78fadf20ac0c0c78775ba15dc7a7e20d4ef1b0b Reviewed-on: https://skia-review.googlesource.com/81803 Reviewed-by: Ravi Mistry <rmistry@google.com> Reviewed-by: Eric Boren <borenet@google.com> Commit-Queue: Ravi Mistry <rmistry@google.com>
Diffstat (limited to 'PRESUBMIT.py')
-rw-r--r--PRESUBMIT.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 277a956e42..3499246b18 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -35,6 +35,11 @@ PUBLIC_API_OWNERS = (
'hcm@google.com',
)
+AUTO_COMMIT_BOTS = (
+ 'update-docs@skia.org',
+ 'update-skps@skia.org'
+)
+
AUTHORS_FILE_NAME = 'AUTHORS'
DOCS_PREVIEW_URL = 'https://skia.org/?cl='
@@ -466,15 +471,18 @@ def PostUploadHook(cl, change, output_api):
issue = cl.issue
if issue:
+ # Skip PostUploadHooks for all auto-commit bots. New patchsets (caused
+ # due to PostUploadHooks) invalidates the CQ+2 vote from the
+ # "--use-commit-queue" flag to "git cl upload".
+ if cl.GetIssueOwner() in AUTO_COMMIT_BOTS:
+ return
+
original_description_lines, footers = cl.GetDescriptionFooters()
new_description_lines = list(original_description_lines)
# If the change includes only doc changes then add No-Try: true in the
- # CL's description if it does not exist yet. Do this for all users except
- # update-docs@skia.org (see skbug.com/7310).
- if (cl.GetIssueOwner() != "update-docs@skia.org" and
- all_docs_changes and
- not _FooterExists(footers, 'No-Try', 'true')):
+ # CL's description if it does not exist yet.
+ if all_docs_changes and not _FooterExists(footers, 'No-Try', 'true'):
new_description_lines.append('No-Try: true')
results.append(
output_api.PresubmitNotifyResult(