From e1c386515a79f45bde53de4db8bb2d097e3fe8bc Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Fri, 12 Nov 2021 09:11:28 -0500 Subject: [PATCH] Report specific filter issue through a template Related feedback: - https://github.com/uBlockOrigin/uBlock-issues/issues/1541#issuecomment-966697347 --- src/js/support.js | 36 ++++++------------------------------ src/support.html | 2 +- 2 files changed, 7 insertions(+), 31 deletions(-) diff --git a/src/js/support.js b/src/js/support.js index 53357c4f93ce7..cc18c3e007f8d 100644 --- a/src/js/support.js +++ b/src/js/support.js @@ -183,36 +183,12 @@ function reportSpecificFilterType() { } function reportSpecificFilterIssue(ev) { - const bodyTemplate = [ - '## Address of the web page', - '', - '`{{url}}`', - '', - '## Type of issue', - '', - '{{type}}', - '', - '## Description (when issue is not obvious)', - '', - '[none]', - '', - '## Screenshot (when description is difficult)', - '', - '[none]', - '', - '## Configuration', - '', - '{{configuration}}', - ].join('\n'); - const githubURL = new URL('https://github.com/uBlockOrigin/uAssets/issues/new'); - const issueType = document.querySelector('[data-i18n="supportS6Select1"] ~ select').value; - const title = `${reportSpecificFilterHostname()}: ${reportSpecificFilterType()}`; - const body = bodyTemplate - .replace('{{url}}', reportURL.href) - .replace('{{type}}', issueType) - .replace('{{configuration}}', configToMarkdown(false)); - githubURL.searchParams.set('title', title); - githubURL.searchParams.set('body', body); + const githubURL = new URL('https://github.com/uBlockOrigin/uAssets/issues/new?template=specific_report_from_ubo.yml'); + const issueType = reportSpecificFilterType(); + githubURL.searchParams.set('title', `${reportSpecificFilterHostname()}: ${issueType}`); + githubURL.searchParams.set('url_address_of_the_web_page', '`' + reportURL.href + '`'); + githubURL.searchParams.set('category', issueType); + githubURL.searchParams.set('configuration', configToMarkdown(false)); vAPI.messaging.send('default', { what: 'gotoURL', details: { url: githubURL.href, select: true, index: -1 }, diff --git a/src/support.html b/src/support.html index 92e31e713e108..8ecada8032332 100644 --- a/src/support.html +++ b/src/support.html @@ -50,7 +50,7 @@

- +