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

Unified Diff: chrome/browser/resources/PRESUBMIT.py

Issue 2701603004: Convert remaining PostUploadHooks to use EnsureCQIncludeTrybotsAreAdded. (Closed)
Patch Set: Created 3 years, 10 months 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 | content/browser/frame_host/PRESUBMIT.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/PRESUBMIT.py
diff --git a/chrome/browser/resources/PRESUBMIT.py b/chrome/browser/resources/PRESUBMIT.py
index 38260bc8190de24192f79c856cd36c6c25f30f4a..3f14fe793132fc9fe598974787b985d5ab426a49 100644
--- a/chrome/browser/resources/PRESUBMIT.py
+++ b/chrome/browser/resources/PRESUBMIT.py
@@ -114,24 +114,9 @@ def CheckChangeOnCommit(input_api, output_api):
def PostUploadHook(cl, change, output_api):
- rietveld_obj = cl.RpcServer()
- description = rietveld_obj.get_description(cl.issue)
-
- existing_bots = (change.CQ_INCLUDE_TRYBOTS or '').split(';')
- clean_bots = set(filter(None, map(lambda s: s.strip(), existing_bots)))
- new_bots = clean_bots | set(
- ['master.tryserver.chromium.linux:closure_compilation'])
- new_tag = 'CQ_INCLUDE_TRYBOTS=%s' % ';'.join(new_bots)
-
- if clean_bots:
- tag_reg = '^CQ_INCLUDE_TRYBOTS=.*$'
- new_description = re.sub(tag_reg, new_tag, description, flags=re.M | re.I)
- else:
- new_description = description + '\n' + new_tag
-
- if new_description == description:
- return []
-
- rietveld_obj.update_description(cl.issue, new_description)
- return [output_api.PresubmitNotifyResult(
- 'Automatically added optional Closure bots to run on CQ.')]
+ return output_api.EnsureCQIncludeTrybotsAreAdded(
+ cl,
+ [
+ 'master.tryserver.chromium.linux:closure_compilation',
+ ],
+ 'Automatically added optional Closure bots to run on CQ.')
« no previous file with comments | « no previous file | content/browser/frame_host/PRESUBMIT.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698