[FIX] forwardport: the fix

it's a per-call parameter not a per-instance one
This commit is contained in:
Xavier Morel 2019-10-18 08:11:27 +02:00
parent c1cef0c18b
commit 13d76fdfb9

View File

@ -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,