From 75c27a5dfbd10ea2f555f5c7edeeb7f3b94a9aa8 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 4 Sep 2024 10:14:25 -0700 Subject: [PATCH] feat: enhance GitHub issue reporting functionality --- aider/commands.py | 12 ++++++++---- aider/report.py | 6 ++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/aider/commands.py b/aider/commands.py index f96c6d090..6f6fb6acd 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -1140,10 +1140,14 @@ class Commands: from aider.report import report_github_issue announcements = "\n".join(self.coder.get_announcements()) - issue_text = ( - f"{'User report:\n\n' if args.strip() else ''}{args}\n\nAnnouncements:\n{announcements}" - ) - report_github_issue(issue_text, confirm=False) + issue_text = announcements + + if args.strip(): + title = args.strip() + else: + title = None + + report_github_issue(issue_text, title=title, confirm=False) def expand_subdir(file_path): diff --git a/aider/report.py b/aider/report.py index b8fd13aeb..0f5f613ef 100644 --- a/aider/report.py +++ b/aider/report.py @@ -74,12 +74,10 @@ def report_github_issue(issue_text, title=None, confirm=True): if not yes: return - if confirm: - print("Attempting to open the issue URL in your default web browser...") + print("Attempting to open the issue URL in your default web browser...") try: if webbrowser.open(issue_url): - if confirm: - print("Browser window should be opened.") + print("Browser window should be opened.") except Exception: pass