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

Unified Diff: infra/bots/recipe_modules/vars/api.py

Issue 2263323002: Apply gerrit ref if it is a Gerrit patch (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Cleanup Created 4 years, 4 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
Index: infra/bots/recipe_modules/vars/api.py
diff --git a/infra/bots/recipe_modules/vars/api.py b/infra/bots/recipe_modules/vars/api.py
index e2d0ed99c02534a4130e807a3e5186acaef25b84..5418e26022cc33706588836df03a95e016ba861d 100644
--- a/infra/bots/recipe_modules/vars/api.py
+++ b/infra/bots/recipe_modules/vars/api.py
@@ -110,13 +110,16 @@ class SkiaVarsApi(recipe_api.RecipeApi):
self.default_env.update({'SKIA_OUT': self.skia_out,
'BUILDTYPE': self.configuration})
self.is_trybot = self.builder_cfg['is_trybot']
+ self.patch_storage = self.m.properties.get('patch_storage', '')
self.issue = None
self.patchset = None
- self.rietveld = None
if self.is_trybot:
- self.issue = self.m.properties['issue']
- self.patchset = self.m.properties['patchset']
- self.rietveld = self.m.properties['rietveld']
+ if self.patch_storage == 'gerrit':
+ self.issue = self.m.properties['event.change.number']
+ self.patchset = self.m.properties['event.patchSet.ref'].split('/')[-1]
+ else:
+ self.issue = self.m.properties['issue']
+ self.patchset = self.m.properties['patchset']
self.dm_dir = self.m.path.join(
self.swarming_out_dir, 'dm')
self.perf_data_dir = self.m.path.join(self.swarming_out_dir,

Powered by Google App Engine
This is Rietveld 408576698