mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 04:14:59 +00:00
feat: add --yes flag to auto-close duplicate issues without prompting
This commit is contained in:
parent
eb8fdf483e
commit
e9627cb3c6
1 changed files with 11 additions and 7 deletions
|
@ -1,7 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
add a --yes switch @ai
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import re
|
||||
from collections import defaultdict
|
||||
|
@ -114,6 +113,10 @@ def comment_and_close_duplicate(issue, oldest_issue):
|
|||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description='Handle duplicate GitHub issues')
|
||||
parser.add_argument('--yes', action='store_true', help='Automatically close duplicates without prompting')
|
||||
args = parser.parse_args()
|
||||
|
||||
if not TOKEN:
|
||||
print("Error: Missing GITHUB_TOKEN environment variable. Please check your .env file.")
|
||||
return
|
||||
|
@ -144,11 +147,12 @@ def main():
|
|||
f" {oldest_issue['html_url']} ({oldest_issue['state']})"
|
||||
)
|
||||
|
||||
# Confirmation prompt
|
||||
confirm = input("Do you want to comment and close duplicate issues? (y/n): ")
|
||||
if confirm.lower() != "y":
|
||||
print("Skipping this group of issues.")
|
||||
continue
|
||||
if not args.yes:
|
||||
# Confirmation prompt
|
||||
confirm = input("Do you want to comment and close duplicate issues? (y/n): ")
|
||||
if confirm.lower() != "y":
|
||||
print("Skipping this group of issues.")
|
||||
continue
|
||||
|
||||
# Comment and close duplicate issues
|
||||
for issue in issues:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue