From f18b7a9b620586a7e77aa5eccfd9bf460c634525 Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Mon, 1 Aug 2022 14:46:53 +0000 Subject: [PATCH] fix: Update issue reporting link with body The "Bug ..." title prefix didn't seem very useful. We have labels to report a bug, and the version is rarely at play, since we don't want to play a game of regression whack-a-mole. This updates it to be mostly empty, which seems fine until we have a problem. --- site/src/components/Footer/Footer.test.tsx | 4 +--- site/src/components/Footer/Footer.tsx | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/site/src/components/Footer/Footer.test.tsx b/site/src/components/Footer/Footer.test.tsx index 14a3c1fc3e8ba..20837f5cedcc9 100644 --- a/site/src/components/Footer/Footer.test.tsx +++ b/site/src/components/Footer/Footer.test.tsx @@ -15,8 +15,6 @@ describe("Footer", () => { throw new Error("Bug report link not found in footer") } - expect(reportBugLink.getAttribute("href")).toBe( - `https://github.com/coder/coder/issues/new?labels=bug,needs+grooming&title=Bug+in+${MockBuildInfo.version}:&template=external_bug_report.md`, - ) + expect(reportBugLink.getAttribute("href")?.length).toBeGreaterThan(0) }) }) diff --git a/site/src/components/Footer/Footer.tsx b/site/src/components/Footer/Footer.tsx index 387c9471ade64..6a61b36872365 100644 --- a/site/src/components/Footer/Footer.tsx +++ b/site/src/components/Footer/Footer.tsx @@ -19,7 +19,9 @@ export interface FooterProps { export const Footer: React.FC = ({ buildInfo }) => { const styles = useFooterStyles() - const githubUrl = `https://github.com/coder/coder/issues/new?labels=bug,needs+grooming&title=Bug+in+${buildInfo?.version}:&template=external_bug_report.md` + const githubUrl = `https://github.com/coder/coder/issues/new?labels=needs+grooming&body=${encodeURIComponent(`Version: [\`${buildInfo?.version}\`](${buildInfo?.external_url}) + +`)}` return (