From b5e2acc413ff60e99ef5ba952b10acf67c78ec87 Mon Sep 17 00:00:00 2001 From: Ravi Mistry Date: Thu, 7 Dec 2017 11:10:11 -0500 Subject: 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 Reviewed-by: Eric Boren Commit-Queue: Ravi Mistry --- PRESUBMIT.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'PRESUBMIT.py') 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( -- cgit v1.2.3