fix(pr-comment): omit 'View full report' link when reportUrl is empty#5
Merged
Conversation
The API endpoint currently doesn't return a 'url' field in its response, so reportUrl was rendered as '[View full report]()' — an empty href that GitHub resolves to the current page (the PR itself). Confusing for readers. When reportUrl is empty, drop the link line entirely. Once the API returns a proper URL, the link comes back automatically without a code change. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
The upload endpoint on
api.prestaflow.io/ci/github-action/currently only returns{id}in the response body (nourl). The action then rendered the PR comment with:which GitHub resolves to the current page (i.e. clicking it takes readers back to the PR they're already on). Confusing UX.
Fix
When
reportUrlis empty, drop the link line entirely. Once the API starts returning aurl, the link comes back automatically — no code change needed.Applies to both success and failure body variants.
Test plan
Follow-up
The API should return a
urlfield alongsideid— separate ticket on the backend.🤖 Generated with Claude Code