mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 08:14:59 +00:00
feat: add progress bar while collecting issues
This commit is contained in:
parent
10fee78ddd
commit
de87418647
1 changed files with 14 additions and 12 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue