mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 00:35:00 +00:00
style: Format issues.py with black linter
This commit is contained in:
parent
46251c6a1c
commit
ddfd1276c5
1 changed files with 16 additions and 11 deletions
|
@ -115,25 +115,30 @@ def comment_and_close_duplicate(issue, oldest_issue):
|
||||||
def find_unlabeled_with_paul_comments(issues):
|
def find_unlabeled_with_paul_comments(issues):
|
||||||
unlabeled_issues = []
|
unlabeled_issues = []
|
||||||
for issue in issues:
|
for issue in issues:
|
||||||
if not issue['labels'] and issue['state'] == 'open':
|
if not issue["labels"] and issue["state"] == "open":
|
||||||
# Get comments for this issue
|
# Get comments for this issue
|
||||||
comments_url = f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}/comments"
|
comments_url = (
|
||||||
|
f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/issues/{issue['number']}/comments"
|
||||||
|
)
|
||||||
response = requests.get(comments_url, headers=headers)
|
response = requests.get(comments_url, headers=headers)
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
comments = response.json()
|
comments = response.json()
|
||||||
|
|
||||||
# Check if paul-gauthier has commented
|
# Check if paul-gauthier has commented
|
||||||
if any(comment['user']['login'] == 'paul-gauthier' for comment in comments):
|
if any(comment["user"]["login"] == "paul-gauthier" for comment in comments):
|
||||||
unlabeled_issues.append(issue)
|
unlabeled_issues.append(issue)
|
||||||
return unlabeled_issues
|
return unlabeled_issues
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser(description="Handle duplicate GitHub issues")
|
parser = argparse.ArgumentParser(description="Handle duplicate GitHub issues")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--yes", action="store_true", help="Automatically close duplicates without prompting"
|
"--yes", action="store_true", help="Automatically close duplicates without prompting"
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--find-unlabeled", action="store_true", help="Find unlabeled issues with paul-gauthier comments"
|
"--find-unlabeled",
|
||||||
|
action="store_true",
|
||||||
|
help="Find unlabeled issues with paul-gauthier comments",
|
||||||
)
|
)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
@ -157,7 +162,7 @@ def main():
|
||||||
|
|
||||||
if not args.yes:
|
if not args.yes:
|
||||||
confirm = input("\nDo you want to add the 'question' label to these issues? (y/n): ")
|
confirm = input("\nDo you want to add the 'question' label to these issues? (y/n): ")
|
||||||
if confirm.lower() != 'y':
|
if confirm.lower() != "y":
|
||||||
print("Skipping labeling.")
|
print("Skipping labeling.")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue