From e25dc5e6ee17ca0ed196153402a07e838062129f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Lebrun?= Date: Wed, 6 May 2026 10:56:57 +0200 Subject: [PATCH] web: fix bug reporting link in get_error_page() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We used the ADD_ISSUE_LINK constant variable URL from two places. At one, we forgot appending `?body=`. Add it by calling into the same function that builds the URL once. Drop the constant URL now that it is consumed from a single place. Signed-off-by: Théo Lebrun --- elixir/web.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/elixir/web.py b/elixir/web.py index 0a77776..f335838 100755 --- a/elixir/web.py +++ b/elixir/web.py @@ -43,7 +43,6 @@ from .web_utils import ProjectConverter, IdentConverter, validate_version, valid get_elixir_version_string, get_elixir_repo_url, RequestContext, Config VERSION_CACHE_DURATION_SECONDS = 2 * 60 # 2 minutes -ADD_ISSUE_LINK = "https://github.com/bootlin/elixir/issues/new" ELIXIR_VERSION_STRING = get_elixir_version_string() ELIXIR_REPO_LINK = get_elixir_repo_url(ELIXIR_VERSION_STRING) @@ -76,7 +75,7 @@ def get_github_issue_url(details: str): "---\n\n" + details) - return ADD_ISSUE_LINK + "?body=" + parse.quote(body) + return "https://github.com/bootlin/elixir/issues/new?body=" + parse.quote(body) # Generate an error page from ElixirProjectError @@ -157,7 +156,7 @@ def get_error_page(req, resp, exception: ElixirProjectError): 'source_base_url': '/', 'referer': req.referer, - 'bug_report_url': ADD_ISSUE_LINK + parse.quote(report_error_details), + 'bug_report_url': get_github_issue_url(report_error_details), 'report_error_details': report_error_details, 'error_title': exception.title,