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

Unified Diff: gerrit_util.py

Issue 1916123002: Fetch Gerrit cl description from gitiles. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: fix Created 4 years, 8 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 | git_cl.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gerrit_util.py
diff --git a/gerrit_util.py b/gerrit_util.py
index 53dc69c0c6d2806231e86f97e520faa7edb0e9ee..049c1c28926df10fa74fb8ed7a81ec5d78e82ebc 100755
--- a/gerrit_util.py
+++ b/gerrit_util.py
@@ -483,6 +483,17 @@ def GetChangeDetail(host, change, o_params=None):
return ReadHttpJsonResponse(CreateHttpConn(host, path))
+def GetChangeDescriptionFromGitiles(url, revision):
+ """Query Gitiles for actual commit message for a given url and ref.
+
+ url must be obtained from call to GetChangeDetail for a specific
+ revision (patchset) under 'fetch' key.
+ """
+ parsed = urlparse.urlparse(url)
+ path = '%s/+/%s?format=json' % (parsed.path, revision)
+ return ReadHttpJsonResponse(CreateHttpConn(parsed.netloc, path))['message']
+
+
def GetChangeCurrentRevision(host, change):
"""Get information about the latest revision for a given change."""
return QueryChanges(host, {}, change, o_params=('CURRENT_REVISION',))
« no previous file with comments | « no previous file | git_cl.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698