diff --git a/src/codegate/pipeline/extract_snippets/output.py b/src/codegate/pipeline/extract_snippets/output.py index a9b7adae..53b3af24 100644 --- a/src/codegate/pipeline/extract_snippets/output.py +++ b/src/codegate/pipeline/extract_snippets/output.py @@ -72,7 +72,8 @@ async def _snippet_comment(self, snippet: CodeSnippet, context: PipelineContext) lib_type = lib["properties"]["type"] lib_status = lib["properties"]["status"] lib_url = ( - f"https://www.insight.stacklok.com/report/{lib_type}/{quote(lib_name, safe='')}" + f"https://www.insight.stacklok.com/report/{lib_type}/" + f"{quote(lib_name, safe='')}?utm_source=codegate" ) warnings.append( diff --git a/src/codegate/utils/utils.py b/src/codegate/utils/utils.py index 6096e051..d0be0edd 100644 --- a/src/codegate/utils/utils.py +++ b/src/codegate/utils/utils.py @@ -19,7 +19,10 @@ def generate_vector_string(package) -> str: } vector_str += f" is a {type_map.get(package['type'], 'package of unknown type')}. " package_name = quote(package["name"], safe="") - package_url = f"https://www.insight.stacklok.com/report/{package['type']}/{package_name}" + package_url = ( + f"https://www.insight.stacklok.com/report/{package['type']}/" + f"{package_name}?utm_source=codegate" + ) # Add extra status status_suffix = status_messages.get(package["status"], "")