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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl.py

Issue 2715093002: Add back use of --auth-refresh-token-json for wpt-import (Closed)
Patch Set: Update test 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 | third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl.py
index 34b80cdd68a7feea11e99308ab8316b3c67ade3e..1c7ac2579d366ba7ba3cfe8931b6fda8ddde2f62 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl.py
@@ -16,16 +16,23 @@ from webkitpy.common.net.buildbot import Build, filter_latest_builds
_log = logging.getLogger(__name__)
+# A refresh token may be needed for some commands, such as git cl try,
+# in order to authenticate with buildbucket.
+_COMMANDS_THAT_TAKE_REFRESH_TOKEN = ('try',)
+
class GitCL(object):
- def __init__(self, host, cwd=None):
+ def __init__(self, host, auth_refresh_token_json=None, cwd=None):
self._host = host
+ self._auth_refresh_token_json = auth_refresh_token_json
self._cwd = cwd
def run(self, args):
"""Runs git-cl with the given arguments and returns the output."""
command = ['git', 'cl'] + args
+ if self._auth_refresh_token_json and args[0] in _COMMANDS_THAT_TAKE_REFRESH_TOKEN:
+ command += ['--auth-refresh-token-json', self._auth_refresh_token_json]
return self._host.executive.run_command(command, cwd=self._cwd)
def get_issue_number(self):
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698