Merge "Support the fragment form of Gerrit URLs"
This commit is contained in:
commit
c39f388984
|
@ -54,8 +54,11 @@ class TestGerritCRD(ZuulTestCase):
|
|||
A.setDependsOn(AM1, 1)
|
||||
AM1.setDependsOn(AM2, 1)
|
||||
|
||||
# So that at least one test uses the /#/c/ form of the url,
|
||||
# use it here.
|
||||
url = 'https://%s/#/c/%s' % (B.gerrit.server, B.number)
|
||||
A.data['commitMessage'] = '%s\n\nDepends-On: %s\n' % (
|
||||
A.subject, B.data['url'])
|
||||
A.subject, url)
|
||||
|
||||
self.fake_gerrit.addEvent(A.addApproval('Approved', 1))
|
||||
self.waitUntilSettled()
|
||||
|
|
|
@ -54,7 +54,10 @@ class GerritSource(BaseSource):
|
|||
parsed = urllib.parse.urlparse(url)
|
||||
except ValueError:
|
||||
return None
|
||||
m = self.change_re.match(parsed.path)
|
||||
path = parsed.path
|
||||
if parsed.fragment:
|
||||
path += '#' + parsed.fragment
|
||||
m = self.change_re.match(path)
|
||||
if not m:
|
||||
return None
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue