mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45: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)
|
||||
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
|
||||
ref = github('get', refurl)
|
||||
ref = github('get', refurl, check=False)
|
||||
if ref.status_code != 200:
|
||||
_deleter.info("✘ branch already deleted (%s)", ref.json())
|
||||
return
|
||||
@ -149,7 +149,7 @@ class DeleteBranches(models.Model, Queue):
|
||||
)
|
||||
return
|
||||
|
||||
r = github('delete', refurl)
|
||||
r = github('delete', refurl, check=False)
|
||||
assert r.status_code == 204, \
|
||||
"Tried to delete branch %s of %s, got %s" % (
|
||||
branch, self.pr_id.display_name,
|
||||
|
Loading…
Reference in New Issue
Block a user