mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +07:00
[FIX] forwardport: forgot token when getting PR commits
So would break any time it needed to fetch the commits of a PR in a private repo.
This commit is contained in:
parent
426bc69ea1
commit
60f4db8687
@ -303,8 +303,10 @@ class PullRequests(models.Model):
|
|||||||
), None)
|
), None)
|
||||||
|
|
||||||
def _commits_lazy(self):
|
def _commits_lazy(self):
|
||||||
|
s = requests.Session()
|
||||||
|
s.headers['Authorization'] = 'token %s' % self.repository.project_id.fp_github_token
|
||||||
for page in itertools.count(1):
|
for page in itertools.count(1):
|
||||||
r = requests.get('https://api.github.com/repos/{}/pulls/{}/commits'.format(
|
r = s.get('https://api.github.com/repos/{}/pulls/{}/commits'.format(
|
||||||
self.repository.name,
|
self.repository.name,
|
||||||
self.number
|
self.number
|
||||||
), params={'page': page})
|
), params={'page': page})
|
||||||
|
Loading…
Reference in New Issue
Block a user