mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 18:25:00 +00:00
feat: enhance GitHub issue reporting functionality
This commit is contained in:
parent
7598f883f5
commit
75c27a5dfb
2 changed files with 10 additions and 8 deletions
|
@ -1140,10 +1140,14 @@ class Commands:
|
||||||
from aider.report import report_github_issue
|
from aider.report import report_github_issue
|
||||||
|
|
||||||
announcements = "\n".join(self.coder.get_announcements())
|
announcements = "\n".join(self.coder.get_announcements())
|
||||||
issue_text = (
|
issue_text = announcements
|
||||||
f"{'User report:\n\n' if args.strip() else ''}{args}\n\nAnnouncements:\n{announcements}"
|
|
||||||
)
|
if args.strip():
|
||||||
report_github_issue(issue_text, confirm=False)
|
title = args.strip()
|
||||||
|
else:
|
||||||
|
title = None
|
||||||
|
|
||||||
|
report_github_issue(issue_text, title=title, confirm=False)
|
||||||
|
|
||||||
|
|
||||||
def expand_subdir(file_path):
|
def expand_subdir(file_path):
|
||||||
|
|
|
@ -74,12 +74,10 @@ def report_github_issue(issue_text, title=None, confirm=True):
|
||||||
if not yes:
|
if not yes:
|
||||||
return
|
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:
|
try:
|
||||||
if webbrowser.open(issue_url):
|
if webbrowser.open(issue_url):
|
||||||
if confirm:
|
print("Browser window should be opened.")
|
||||||
print("Browser window should be opened.")
|
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue