diff --git a/.changeset/brave-boats-greet.md b/.changeset/brave-boats-greet.md new file mode 100644 index 0000000000..e9d3debc35 --- /dev/null +++ b/.changeset/brave-boats-greet.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-lighthouse': patch +--- + +Strip trailing slash from url when creating a new audit. This change prevents duplicate audits from being displayed in the audit list. 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: {