feat: add progress bar while collecting issues

This commit is contained in:
Paul Gauthier (aider) 2024-09-21 16:05:16 -07:00
parent 10fee78ddd
commit de87418647

View file

@ -24,6 +24,7 @@ headers = {"Authorization": f"token {TOKEN}", "Accept": "application/vnd.github.
def get_issues(state="open"):
issues = []
page = 1
with tqdm(desc="Collecting issues", unit="page") as pbar:
while True:
response = requests.get(
f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues",
@ -36,6 +37,7 @@ def get_issues(state="open"):
break
issues.extend(page_issues)
page += 1
pbar.update(1)
return issues