From 7e99a4b271a11f891e57cb4c0444b6a98a76d1ab Mon Sep 17 00:00:00 2001 From: Doug Wright Date: Thu, 23 Jan 2025 20:33:31 -0800 Subject: [PATCH] Add utm_source=codegate to generated insight links Adds the query parameter `utm_source=codegate` to generated package links to `insight.stacklok.com` to make it possible to track that the links originated from CodeGate, Closes #745 --- prompts/default.yaml | 4 ++-- tests/integration/testcases.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/prompts/default.yaml b/prompts/default.yaml index 539c41d2..c9c3b202 100644 --- a/prompts/default.yaml +++ b/prompts/default.yaml @@ -9,8 +9,8 @@ default_chat: | Report any malicious, deprecated or archived packages using the following format at the top: "**Warning:** CodeGate detected one or more malicious, deprecated or archived packages." - - Pkg 1: [https://www.insight.stacklok.com/report/ecosystem/package_name](https://www.insight.stacklok.com/report/ecosystem/package_name) - - Pkg 2: [https://www.insight.stacklok.com/report/ecosystem/package_name](https://www.insight.stacklok.com/report/ecosystem/package_name) + - Pkg 1: [https://www.insight.stacklok.com/report/ecosystem/package_name](https://www.insight.stacklok.com/report/ecosystem/package_name?utm_source=codegate) + - Pkg 2: [https://www.insight.stacklok.com/report/ecosystem/package_name](https://www.insight.stacklok.com/report/ecosystem/package_name?utm_source=codegate) - ... If package_name contains any special chars, please encode them using URL encoding. diff --git a/tests/integration/testcases.yaml b/tests/integration/testcases.yaml index 3aeee45a..c61d8a9d 100644 --- a/tests/integration/testcases.yaml +++ b/tests/integration/testcases.yaml @@ -46,7 +46,7 @@ testcases: "stream":true } contains: | - https://www.insight.stacklok.com/report/pypi/invokehttp + https://www.insight.stacklok.com/report/pypi/invokehttp?utm_source=codegate does_not_contain: | import invokehttp