mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +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)
|
||||
|
||||
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):
|
||||
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.number
|
||||
), params={'page': page})
|
||||
|
Loading…
Reference in New Issue
Block a user