From 1cac511fd56128def602d27065be43d8409e930d Mon Sep 17 00:00:00 2001 From: Kevin Lee Date: Sun, 10 Jan 2021 08:56:35 -0800 Subject: [PATCH 1/3] Strip trailing slash from urls when creating lighthouse audit --- plugins/lighthouse/src/components/CreateAudit/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/lighthouse/src/components/CreateAudit/index.tsx b/plugins/lighthouse/src/components/CreateAudit/index.tsx index 18f2c30a6e..8f514eb54a 100644 --- a/plugins/lighthouse/src/components/CreateAudit/index.tsx +++ b/plugins/lighthouse/src/components/CreateAudit/index.tsx @@ -79,7 +79,7 @@ export const CreateAuditContent = () => { // TODO use the id from the response to redirect to the audit page for that id when // FAILED and RUNNING audits are supported await lighthouseApi.triggerAudit({ - url, + url: url.replace(/\/$/, ''), options: { lighthouseConfig: { settings: { From cf7df3b1ffd855822ff5a06a506984ebb28b48a0 Mon Sep 17 00:00:00 2001 From: Kevin Lee Date: Sun, 10 Jan 2021 09:07:33 -0800 Subject: [PATCH 2/3] Add changeset for lighthouse plugin bugfix --- .changeset/brave-boats-greet.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/brave-boats-greet.md diff --git a/.changeset/brave-boats-greet.md b/.changeset/brave-boats-greet.md new file mode 100644 index 0000000000..8b7fbae63b --- /dev/null +++ b/.changeset/brave-boats-greet.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-lighthouse': patch +--- + +Strip trailing slash from urls when creating a new audit. This change prevents duplicate audits from being displayed in the audit list. From fd2c2fc1caf0f8fb5bd58affa8b76782165e1600 Mon Sep 17 00:00:00 2001 From: Kevin Lee Date: Sun, 10 Jan 2021 14:53:06 -0800 Subject: [PATCH 3/3] Fix typo in changeset --- .changeset/brave-boats-greet.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/brave-boats-greet.md b/.changeset/brave-boats-greet.md index 8b7fbae63b..e9d3debc35 100644 --- a/.changeset/brave-boats-greet.md +++ b/.changeset/brave-boats-greet.md @@ -2,4 +2,4 @@ '@backstage/plugin-lighthouse': patch --- -Strip trailing slash from urls when creating a new audit. This change prevents duplicate audits from being displayed in the audit list. +Strip trailing slash from url when creating a new audit. This change prevents duplicate audits from being displayed in the audit list.