Merge pull request #17363 from dvdksn/chore/fix-create-issue-links

chore: update create-issue links
This commit is contained in:
David Karlsson 2023-05-18 19:25:23 +02:00 committed by GitHub
commit 1ecad399de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 11 deletions

15
404.md
View File

@ -9,9 +9,7 @@ skip_read_time: true
There might be a mistake in the URL or you might've clicked a link to content There might be a mistake in the URL or you might've clicked a link to content
that no longer exists. If you think it's the latter, please file an issue in that no longer exists. If you think it's the latter, please file an issue in
our [issue tracker on GitHub]({{ site.repo }}/issues/new) our issue tracker on GitHub.
and let us know what happened. Please also include a link to where the error
occurred, if applicable.
[**Click here to create a new ticket**]({{ site.repo }}/issues/new){:.newissue.button.primary-btn} [**Click here to create a new ticket**]({{ site.repo }}/issues/new){:.newissue.button.primary-btn}
@ -21,12 +19,11 @@ occurred, if applicable.
let el = document.querySelector("a.newissue"); let el = document.querySelector("a.newissue");
if (el) { if (el) {
let url = new URL("{{ site.repo }}/issues/new"); let url = new URL("{{ site.repo }}/issues/new");
url.searchParams.set("title", "404 at " + window.location.pathname); url.searchParams.set("template", "broken_link.yml")
let body = "I found a broken link : " + window.location.href; url.searchParams.set("title", "[404]: " + window.location.pathname);
if (document.referrer !== "") { url.searchParams.set("target", window.location.href);
body += "\nI arrived on this page through: " + document.referrer url.searchParams.set("location", document.referrer);
} url.searchParams.set("labels", "status/triage");
url.searchParams.set("body", body);
el.setAttribute("href", url.toString()); el.setAttribute("href", url.toString());
} }
</script> </script>

View File

@ -8,7 +8,7 @@
{%- if page.issue_url -%} {%- if page.issue_url -%}
{%- assign issue_url = page.issue_url -%} {%- assign issue_url = page.issue_url -%}
{%- else -%} {%- else -%}
{% capture issue_url %}{{ site.repo }}/issues/new?body=File: [{{ page.path }}]({{ site.docs_url }}{{ page.url }}){% endcapture %} {% capture issue_url %}{{ site.repo }}/issues/new?template=doc_issue.yml&location={{ site.docs_url }}{{ page.url }}&labels=status%2Ftriage{% endcapture %}
{%- endif -%} --> {%- endif -%} -->
<html lang="en"> <html lang="en">
{%- include head.html -%} {%- include head.html -%}

View File

@ -7,7 +7,7 @@ keywords: application, development
The following development patterns have proven to be helpful for people The following development patterns have proven to be helpful for people
building applications with Docker. If you have discovered something we should building applications with Docker. If you have discovered something we should
add, add,
[let us know]({{ site.repo }}/issues/new){: target="_blank" rel="noopener" class="_"}. [let us know]({{ site.repo }}/issues/new?template=doc_issue.yml&labels=status%2Ftriage){: target="_blank" rel="noopener" class="_"}.
## How to keep your images small ## How to keep your images small