Skip to content

Commit bc96c0e

Browse files
authored
Fix issue with utm_source not appearing in generated insight links (#766)
Closes #765
1 parent 25c2368 commit bc96c0e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/codegate/pipeline/extract_snippets/output.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ async def _snippet_comment(self, snippet: CodeSnippet, context: PipelineContext)
7272
lib_type = lib["properties"]["type"]
7373
lib_status = lib["properties"]["status"]
7474
lib_url = (
75-
f"https://www.insight.stacklok.com/report/{lib_type}/{quote(lib_name, safe='')}"
75+
f"https://www.insight.stacklok.com/report/{lib_type}/"
76+
f"{quote(lib_name, safe='')}?utm_source=codegate"
7677
)
7778

7879
warnings.append(

src/codegate/utils/utils.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ def generate_vector_string(package) -> str:
1919
}
2020
vector_str += f" is a {type_map.get(package['type'], 'package of unknown type')}. "
2121
package_name = quote(package["name"], safe="")
22-
package_url = f"https://www.insight.stacklok.com/report/{package['type']}/{package_name}"
22+
package_url = (
23+
f"https://www.insight.stacklok.com/report/{package['type']}/"
24+
f"{package_name}?utm_source=codegate"
25+
)
2326

2427
# Add extra status
2528
status_suffix = status_messages.get(package["status"], "")

0 commit comments

Comments
 (0)