Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion scripts/action/build-review-comment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ fi
RUN_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
# Stable PR route: the webview resolves the repo/PR's latest artifact itself,
# so the link stays valid across runs instead of pinning one run id.
WEBVIEW_URL="https://app.codeboarding.org/${GITHUB_REPOSITORY}/pull/${PR_NUMBER}"
# Standard utm_* rather than a bespoke ?src=: PostHog lifts utm_* into person and
# session properties by itself, so this is attributable the day the action ships,
# with no matching change in the web app. Without it the only evidence a visit
# came from here is a github.com referrer, which most clients strip and a link
# pasted into chat never had. Constant across runs on purpose: a run id here
# would scatter one pull request's clicks across a new value per re-run.
WEBVIEW_URL="https://app.codeboarding.org/${GITHUB_REPOSITORY}/pull/${PR_NUMBER}?utm_source=github&utm_medium=pr_comment&utm_campaign=gh_action"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Prefix the commit so the tracking change ships

The reviewed commit's subject, Attribute PR-comment clicks to the Action, lacks a feat: or fix: prefix. Because this URL change only reaches Action consumers through a release and release-please ignores unparseable commits when deciding whether to propose one, the attribution functionality can remain unshipped indefinitely; use a release-triggering Conventional Commit subject.

AGENTS.md reference: AGENTS.md:L90-L93

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Separate job-summary clicks from PR-comment traffic

When a reader follows this link from the Actions job summary, the visit is still labeled utm_medium=pr_comment. The same generated body is copied into $GITHUB_STEP_SUMMARY at action.yml:648, including on manual dispatches or runs where posting the comment fails, so those visits are provably not PR-comment clicks and will corrupt the attribution this change is intended to measure; generate a summary-specific URL or use a medium that covers both placements.

Useful? React with 👍 / 👎.

BODY="${RUNNER_TEMP}/review-comment.md"
printf '### CodeBoarding review\n\n**Status:** %s changed %s\n' "$N_CHANGED" "$COMPONENT_NOUN" > "$BODY"
printf '\nSee the full change in [CodeBoarding](%s).\n' "$WEBVIEW_URL" >> "$BODY"
Expand Down
Loading