Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ runs:

⏳ CodeBoarding is analyzing this pull request's architecture changes.

Open it in [CodeBoarding](https://app.codeboarding.org/${{ github.repository }}/pull/${{ steps.guard.outputs.pr_number }}?utm_source=github&utm_medium=pr_comment&utm_campaign=gh_action) meanwhile: the files, comments and review are there already, and the diff appears when the run finishes.
Open it in [CodeBoarding](https://app.codeboarding.org/${{ github.repository }}/pull/${{ steps.guard.outputs.pr_number }}/changes?utm_source=github&utm_medium=pr_comment&utm_campaign=gh_action) meanwhile: the files, comments and review are there already, and the diff appears when the run finishes.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

no just use pull/num and that is


<sub>run [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) · attempt ${{ github.run_attempt }}</sub>

Expand Down
4 changes: 2 additions & 2 deletions scripts/action/build-review-comment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ if [ "$N_CHANGED" = "1" ]; then
COMPONENT_NOUN="component"
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,
# Whole-PR Changes route: the webview resolves the repo/PR's latest artifact itself,
# so the link stays valid across runs instead of pinning one run id.
# 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.
PLATFORM_URL="https://app.codeboarding.org/${GITHUB_REPOSITORY}/pull/${PR_NUMBER}"
PLATFORM_URL="https://app.codeboarding.org/${GITHUB_REPOSITORY}/pull/${PR_NUMBER}/changes"
WEBVIEW_URL="${PLATFORM_URL}?utm_source=github&utm_medium=pr_comment&utm_campaign=gh_action"
BODY="${RUNNER_TEMP}/review-comment.md"
# The status line is what the web platform reads the count from, so its shape is a contract.
Expand Down
2 changes: 1 addition & 1 deletion scripts/action/update-review-progress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ else
second="2. ⏳ Analysing this PR's changes"
fi

platform="https://app.codeboarding.org/$REPOSITORY/pull/$PR_NUMBER?utm_source=github&utm_medium=pr_comment&utm_campaign=gh_action"
platform="https://app.codeboarding.org/$REPOSITORY/pull/$PR_NUMBER/changes?utm_source=github&utm_medium=pr_comment&utm_campaign=gh_action"
run_url="${GITHUB_SERVER_URL:-https://github.com}/$REPOSITORY/actions/runs/${GITHUB_RUN_ID:-}"
body="$(printf '%s\n\n%s\n %s\n%s\n\n%s\n\n%s\n%s' \
'### CodeBoarding review · analyzing…' \
Expand Down
1 change: 1 addition & 0 deletions tests/test_progress_comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def test_the_base_step_says_the_base_is_being_built_and_why(self) -> None:
self.assertIn("1. ⏳ Building the diagram of `main` @a1b2c3d from scratch\n", patch)
self.assertIn(" `main` has no saved diagram this review can start from, so it builds one first.", patch)
self.assertIn("\n2. Analysing this PR's changes\n", patch)
self.assertIn("https://app.codeboarding.org/owner/repo/pull/9/changes?utm_source=github&utm_medium=pr_comment&utm_campaign=gh_action", patch)

def test_the_head_step_marks_the_base_done(self) -> None:
(patch,) = self._post("head")
Expand Down
4 changes: 2 additions & 2 deletions tests/test_review_comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_status_line_and_platform_link_as_the_web_platform_reads_them(self) -> N
body = _build(Path(tmp))
self.assertTrue(body.startswith("### CodeBoarding review\n\n**Status:** 3 changed components\n"))
self.assertIn(
"See the full change in [CodeBoarding](https://app.codeboarding.org/owner/repo/pull/605?utm_source=github",
"See the full change in [CodeBoarding](https://app.codeboarding.org/owner/repo/pull/605/changes?utm_source=github&utm_medium=pr_comment&utm_campaign=gh_action)",
body,
)

Expand All @@ -54,7 +54,7 @@ def test_the_machine_readable_line_ends_the_body(self) -> None:
last = body.rstrip("\n").splitlines()[-1]
self.assertEqual(
last,
"<!-- codeboarding: platform_url=https://app.codeboarding.org/owner/repo/pull/605 changed=3 analysed_files_changed=unknown head=abc123 -->",
"<!-- codeboarding: platform_url=https://app.codeboarding.org/owner/repo/pull/605/changes changed=3 analysed_files_changed=unknown head=abc123 -->",
)
# The status regex the web platform uses must still find the status line, not the marker.
match = re.search(r"\*\*Status:\*\*\s*(\d+)\s+changed\s+components?", body)
Expand Down
Loading