mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 08:44: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"):
|
def get_issues(state="open"):
|
||||||
issues = []
|
issues = []
|
||||||
page = 1
|
page = 1
|
||||||
|
with tqdm(desc="Collecting issues", unit="page") as pbar:
|
||||||
while True:
|
while True:
|
||||||
response = requests.get(
|
response = requests.get(
|
||||||
f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues",
|
f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues",
|
||||||
|
@ -36,6 +37,7 @@ def get_issues(state="open"):
|
||||||
break
|
break
|
||||||
issues.extend(page_issues)
|
issues.extend(page_issues)
|
||||||
page += 1
|
page += 1
|
||||||
|
pbar.update(1)
|
||||||
return issues
|
return issues
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue