mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 18:25:00 +00:00
refactor: move GitHub issue URL to urls.py
This commit is contained in:
parent
03024eaaf1
commit
3c5ad664e6
2 changed files with 3 additions and 2 deletions
|
@ -5,6 +5,7 @@ import urllib.parse
|
||||||
import webbrowser
|
import webbrowser
|
||||||
|
|
||||||
from aider import __version__
|
from aider import __version__
|
||||||
|
from aider.urls import github_issues
|
||||||
|
|
||||||
|
|
||||||
def report_github_issue(issue_text, title=None):
|
def report_github_issue(issue_text, title=None):
|
||||||
|
@ -18,12 +19,11 @@ def report_github_issue(issue_text, title=None):
|
||||||
"""
|
"""
|
||||||
version_info = f"Aider version: {__version__}\n\n"
|
version_info = f"Aider version: {__version__}\n\n"
|
||||||
issue_text = version_info + issue_text
|
issue_text = version_info + issue_text
|
||||||
base_url = "https://github.com/paul-gauthier/aider/issues/new"
|
|
||||||
params = {"body": issue_text}
|
params = {"body": issue_text}
|
||||||
if title is None:
|
if title is None:
|
||||||
title = "Bug report"
|
title = "Bug report"
|
||||||
params["title"] = title
|
params["title"] = title
|
||||||
issue_url = f"{base_url}?{urllib.parse.urlencode(params)}"
|
issue_url = f"{github_issues}?{urllib.parse.urlencode(params)}"
|
||||||
|
|
||||||
print(f"\n# {title}\n")
|
print(f"\n# {title}\n")
|
||||||
print(issue_text.strip())
|
print(issue_text.strip())
|
||||||
|
|
|
@ -8,3 +8,4 @@ model_warnings = "https://aider.chat/docs/llms/warnings.html"
|
||||||
token_limits = "https://aider.chat/docs/troubleshooting/token-limits.html"
|
token_limits = "https://aider.chat/docs/troubleshooting/token-limits.html"
|
||||||
llms = "https://aider.chat/docs/llms.html"
|
llms = "https://aider.chat/docs/llms.html"
|
||||||
large_repos = "https://aider.chat/docs/faq.html#can-i-use-aider-in-a-large-mono-repo"
|
large_repos = "https://aider.chat/docs/faq.html#can-i-use-aider-in-a-large-mono-repo"
|
||||||
|
github_issues = "https://github.com/paul-gauthier/aider/issues/new"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue