mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[FIX] forwardport: don't use token field for tags update
Turns out tagging PRs requires a pretty significant level of ACLs which we may not want to give to the forwardbot? Anyway use the mergebot ACLs (which already include tagging) for this.
This commit is contained in:
parent
8f3f773eef
commit
97999318be
@ -86,10 +86,9 @@ class Project(models.Model):
|
||||
to_remove = []
|
||||
for f in self.env['forwardport.tagging'].search([]):
|
||||
repo = f.repository
|
||||
key = (repo, f.token_field)
|
||||
gh = ghs.get(key)
|
||||
gh = ghs.get(repo)
|
||||
if not gh:
|
||||
gh = ghs[key] = repo.github(f.token_field)
|
||||
gh = ghs[repo] = repo.github()
|
||||
|
||||
try:
|
||||
gh('POST', 'issues/{}/labels'.format(f.pull_request), json={
|
||||
@ -598,7 +597,6 @@ More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port
|
||||
'repository': new_pr.repository.id,
|
||||
'pull_request': new_pr.number,
|
||||
'to_add': json.dumps(labels),
|
||||
'token_field': 'fp_github_token',
|
||||
})
|
||||
# not great but we probably want to avoid the risk of the webhook
|
||||
# creating the PR from under us. There's still a "hole" between
|
||||
|
Loading…
Reference in New Issue
Block a user