mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 12:24:59 +00:00
fix: Handle cases where there are no related issues for a subject
This commit is contained in:
parent
3d70f88bcc
commit
7dd0a0f348
1 changed files with 15 additions and 8 deletions
|
@ -72,19 +72,26 @@ def main():
|
||||||
grouped_open_issues = group_issues_by_subject(open_issues)
|
grouped_open_issues = group_issues_by_subject(open_issues)
|
||||||
|
|
||||||
for subject, issues in grouped_open_issues.items():
|
for subject, issues in grouped_open_issues.items():
|
||||||
|
oldest_issue = find_oldest_issue(subject, all_issues)
|
||||||
|
if not oldest_issue:
|
||||||
|
continue
|
||||||
|
|
||||||
|
related_issues = set(
|
||||||
|
issue['number'] for issue in issues
|
||||||
|
)
|
||||||
|
related_issues.add(oldest_issue['number'])
|
||||||
|
if len(related_issues) <= 1:
|
||||||
|
continue
|
||||||
|
|
||||||
print(f"\nIssue: {subject}")
|
print(f"\nIssue: {subject}")
|
||||||
print(f"Open issues: {len(issues)}")
|
print(f"Open issues: {len(issues)}")
|
||||||
for issue in issues:
|
for issue in issues:
|
||||||
print(f" - {issue['html_url']}")
|
print(f" - {issue['html_url']}")
|
||||||
|
|
||||||
oldest_issue = find_oldest_issue(subject, all_issues)
|
print(
|
||||||
if oldest_issue:
|
f"Oldest issue: {oldest_issue['html_url']} (created on"
|
||||||
print(
|
f" {oldest_issue['created_at']})"
|
||||||
f"Oldest issue: {oldest_issue['html_url']} (created on"
|
)
|
||||||
f" {oldest_issue['created_at']})"
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
print("No oldest issue found")
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue