Skip to content

Commit

Permalink
Fix issue with utm_source not appearing in generated insight links (#766
Browse files Browse the repository at this point in the history
)

Closes #765
  • Loading branch information
wright-io authored Jan 25, 2025
1 parent 25c2368 commit bc96c0e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/codegate/pipeline/extract_snippets/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
5 changes: 4 additions & 1 deletion src/codegate/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"], "")
Expand Down

0 comments on commit bc96c0e

Please sign in to comment.