feat(comments): link tracking id to dashboard review page #58
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/comment-tracking-link"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Render the tracking id in PR comments as a markdown link to
{DASHBOARD_BASE_URL}/reviews/{id} when the dashboard URL is configured;
fall back to the bare code-formatted id otherwise.
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
Render the tracking id in PR comments as a markdown link to {DASHBOARD_BASE_URL}/reviews/{id} when the dashboard URL is configured; fall back to the bare code-formatted id otherwise. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>Automated review by pr-reviewer v0.26.0 | Safety Check | Claude Sonnet 4 | tracking id
r-f5ae66-ca256bThis is an AI-generated review and may contain mistakes.
Status: ✅ Completed
✅ Verdict: LGTM — Clean implementation of markdown link formatting for tracking IDs with safe fallback behavior and no security or compatibility concerns.
Complexity: trivial
Safety Check Review
Code Changes
The PR adds a new function
_tracking_id_md()that formats tracking IDs as markdown links when a dashboard URL is configured, falling back to code-formatted text otherwise. The function is then used to replace hardcoded tracking ID formatting in 4 comment generation functions.Analysis
The change is straightforward string formatting enhancement with proper fallback behavior. No alarming issues detected.
7a28144e4f270b88569bAutomated review by pr-reviewer v0.26.0 | Safety Check | Claude Sonnet 4 | tracking id
r-f5b156-f1414bThis is an AI-generated review and may contain mistakes.
Status: ✅ Completed
✅ Verdict: LGTM — The changes add dashboard linking functionality safely with proper fallbacks and test coverage - the flagged "credential" is just a configuration field being passed through.
Complexity: moderate
Looking at this diff, I can see it adds functionality to render tracking IDs as markdown links to a dashboard review page when a dashboard base URL is configured.
Let me examine the key changes:
New configuration field:
DashboardBaseURLis added to both the runner and webhook configurations - this looks fine.New function
TrackingIDMD: This function creates markdown links when a dashboard URL is provided, otherwise falls back to code-formatted text. The implementation looks correct - it properly trims trailing slashes and constructs the URL path as/reviews/{trackingID}.Updated
FormatHeaderfunction: The function signature is updated to include the dashboard base URL parameter, and the tracking ID rendering is changed from backticks to use the newTrackingIDMDfunction.Test coverage: Tests are added for the new
TrackingIDMDfunction covering both scenarios (with and without dashboard URL), and the existing header test is updated.Widespread updates: All call sites for
FormatHeaderand tracking ID formatting are consistently updated throughout the codebase.The automated observation flagged "possible secret or credential detected" in
cmd/webhook/main.go, but looking at the changes there, I only see the addition ofDashboardBaseURL: cfg.DashboardBaseURL,to configuration structs. This is just passing through a configuration value, not exposing any secrets.The changes appear to be a straightforward feature addition with proper fallback behavior and good test coverage. The code correctly handles edge cases like trailing slashes in URLs and maintains backward compatibility when no dashboard URL is configured.