Skip to content

Commit

Permalink
Get all pages of GitHub issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bclenet committed Sep 25, 2023
1 parent 2cc3c80 commit 01845d9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions narps_open/utils/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ def get_opened_issues():
request_url = 'https://api.github.com/repos/Inria-Empenn/narps_open_pipelines/issues'
request_url += '?page={page_number}'

issues = {}
issues = []
page = True # Will later be replaced by a dict
page_number = 0
while bool(page) :
page_number = 1 # According to the doc, first page is not page 0
# https://docs.github.com/en/rest/issues/issues#list-repository-issues
while page : # TODO check if page is empty
response = get(request_url.format(page_number = str(page_number)), timeout = 2)
response.raise_for_status()
page = response.json()
Expand Down

0 comments on commit 01845d9

Please sign in to comment.