git cl creds-check: improve report and give better recommendation.
R=machenbach@chromium.org,agable@chromium.org
Bug: N/A
Change-Id: I831e9e72c8687c248022f49ea405e149538ef02a
Reviewed-on: https://chromium-review.googlesource.com/563671
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
diff --git a/gerrit_util.py b/gerrit_util.py
index 46bf794..79fb9df 100755
--- a/gerrit_util.py
+++ b/gerrit_util.py
@@ -99,6 +99,15 @@
self.gitcookies = self._get_gitcookies()
@classmethod
+ def get_new_password_url(cls, host):
+ assert not host.startswith('http')
+ # Assume *.googlesource.com pattern.
+ parts = host.split('.')
+ if not parts[0].endswith('-review'):
+ parts[0] += '-review'
+ return 'https://%s/new-password' % ('.'.join(parts))
+
+ @classmethod
def get_new_password_message(cls, host):
assert not host.startswith('http')
# Assume *.googlesource.com pattern.