mirror of
https://github.com/odoo/runbot.git
synced 2025-03-30 23:05:44 +07:00
[FIX] forwardport: the fix
it's a per-call parameter not a per-instance one
This commit is contained in:
parent
c1cef0c18b
commit
13d76fdfb9
@ -132,9 +132,9 @@ class DeleteBranches(models.Model, Queue):
|
|||||||
_deleter.info('✘ PR owner != FP target owner (%s)', repo_owner)
|
_deleter.info('✘ PR owner != FP target owner (%s)', repo_owner)
|
||||||
return # probably don't have access to arbitrary repos
|
return # probably don't have access to arbitrary repos
|
||||||
|
|
||||||
github = GH(token=repository.project_id.fp_github_token, repo=fp_remote, check=False)
|
github = GH(token=repository.project_id.fp_github_token, repo=fp_remote)
|
||||||
refurl = 'git/refs/heads/' + branch
|
refurl = 'git/refs/heads/' + branch
|
||||||
ref = github('get', refurl)
|
ref = github('get', refurl, check=False)
|
||||||
if ref.status_code != 200:
|
if ref.status_code != 200:
|
||||||
_deleter.info("✘ branch already deleted (%s)", ref.json())
|
_deleter.info("✘ branch already deleted (%s)", ref.json())
|
||||||
return
|
return
|
||||||
@ -149,7 +149,7 @@ class DeleteBranches(models.Model, Queue):
|
|||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
r = github('delete', refurl)
|
r = github('delete', refurl, check=False)
|
||||||
assert r.status_code == 204, \
|
assert r.status_code == 204, \
|
||||||
"Tried to delete branch %s of %s, got %s" % (
|
"Tried to delete branch %s of %s, got %s" % (
|
||||||
branch, self.pr_id.display_name,
|
branch, self.pr_id.display_name,
|
||||||
|
Loading…
Reference in New Issue
Block a user