Commit 918463e3 authored by Daniel Smith's avatar Daniel Smith

fix commit lookup

parent bd8c400b
...@@ -625,9 +625,12 @@ def lookupCommitByRef(ref, module=""): ...@@ -625,9 +625,12 @@ def lookupCommitByRef(ref, module=""):
changeNumber = "" changeNumber = ""
patchset = "" patchset = ""
if matches: if matches:
changeNumber = matches[0] changeNumber = matches[0][0]
if matches[1]: else:
patchset = matches[1] print(f"ERROR: Unable to parse ref: {ref}")
return (False, module)
if matches[0][1]:
patchset = matches[0][1]
commitRaw = requests.get(f"https://codereview.qt-project.org/changes/?q={changeNumber}&o=ALL_REVISIONS&o=CURRENT_COMMIT").text[4:] commitRaw = requests.get(f"https://codereview.qt-project.org/changes/?q={changeNumber}&o=ALL_REVISIONS&o=CURRENT_COMMIT").text[4:]
if not commitRaw: if not commitRaw:
return (False, module) return (False, module)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment