Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(586)

Unified Diff: PRESUBMIT.py

Issue 1521913005: Add link to Gold trybot runs in every uploaded Skia CL (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Lint fix Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PRESUBMIT.py
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index e91a2229b97f6bdb48788b9f4f52e2c8d36c6dde..326caad1e8a1fbd915a158ba127ceca2cf6640ff 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -36,6 +36,8 @@ PUBLIC_API_OWNERS = (
AUTHORS_FILE_NAME = 'AUTHORS'
DOCS_PREVIEW_URL = 'https://skia.org/?cl='
+GOLD_TRYBOT_URL = ('https://gold.skia.org/search2?unt=true'
+ '&query=source_type%3Dgm&master=false&issue=')
# Path to CQ bots feature is described in https://bug.skia.org/4364
PATH_PREFIX_TO_EXTRA_TRYBOTS = {
@@ -347,6 +349,7 @@ def PostUploadHook(cl, change, output_api):
"""git cl upload will call this hook after the issue is created/modified.
This hook does the following:
+ * Adds a link to the CL's Gold trybot results.
* Adds a link to preview docs changes if there are any docs changes in the CL.
* Adds 'NOTRY=true' if the CL contains only docs changes.
* Adds 'NOTREECHECKS=true' for non master branch changes since they do not
@@ -377,6 +380,15 @@ def PostUploadHook(cl, change, output_api):
original_description = rietveld_obj.get_description(issue)
new_description = original_description
+ # Add GOLD_TRYBOT_URL if it does not exist yet.
+ if not re.search(r'^GOLD_TRYBOT_URL=', new_description, re.M | re.I):
+ new_description += '\nGOLD_TRYBOT_URL= %s%s' % (GOLD_TRYBOT_URL, issue)
+ results.append(
+ output_api.PresubmitNotifyResult(
+ 'Added link to Gold trybot runs to the CL\'s description.\n'
+ 'Note: Results may take sometime to be populated after trybots '
+ 'complete.'))
+
# If the change includes only doc changes then add NOTRY=true in the
# CL's description if it does not exist yet.
if all_docs_changes and not re.search(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698