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

Unified Diff: recipe_modules/git_cl/api.py

Issue 2087093002: Add upload and issue to git_cl recipe module (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Re-gen expectations Created 4 years, 6 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 | recipe_modules/git_cl/example.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_modules/git_cl/api.py
diff --git a/recipe_modules/git_cl/api.py b/recipe_modules/git_cl/api.py
index 8d2ad5c0d660600040b50f48ef25ca21420f4f0a..96972267a5c47eb2808c8f9ad3704121b06ff208 100644
--- a/recipe_modules/git_cl/api.py
+++ b/recipe_modules/git_cl/api.py
@@ -4,6 +4,8 @@
from recipe_engine import recipe_api
+import string
+
class GitClApi(recipe_api.RecipeApi):
def __call__(self, subcmd, args, name=None, **kwargs):
if not name:
@@ -39,3 +41,14 @@ class GitClApi(recipe_api.RecipeApi):
'description', args, stdout=self.m.raw_io.output(),
stdin=self.m.raw_io.input(data=description),
name='git_cl set description', **kwargs)
+
+ def upload(self, message, upload_args=None, **kwargs):
+ upload_args = upload_args or []
+
+ upload_args.extend(['--message-file', self.m.raw_io.input(message)])
+
+ return self('upload', upload_args, **kwargs)
+
+ def issue(self, **kwargs):
+ return self('issue', [], stdout=self.m.raw_io.output(), **kwargs)
+
« no previous file with comments | « no previous file | recipe_modules/git_cl/example.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698