Merge "[gitlab driver] fix "'EnqueueEvent' object has no attribute 'change_url'""

This commit is contained in:
Zuul 2023-02-22 13:06:27 +00:00 committed by Gerrit Code Review
commit 48ad958bb4
1 changed files with 1 additions and 6 deletions

View File

@ -607,17 +607,12 @@ class GitlabConnection(ZKChangeCacheMixin, ZKBranchCacheMixin, BaseConnection):
return change
project = self.source.getProject(change_key.project_name)
if not change:
if not event:
self.log.error("Change %s not found in cache and no event",
change_key)
if event:
url = event.change_url
change = MergeRequest(project.name)
change.project = project
change.number = number
# patch_number is the tips commit SHA of the MR
change.patchset = change_key.revision
change.url = url or self.getMRUrl(project.name, number)
change.url = self.getMRUrl(project.name, number)
change.uris = [change.url.split('://', 1)[-1]] # remove scheme
log.debug("Getting change mr#%s from project %s" % (