Enhance check summary rendering with clickable link to individual check details URL - #115
Merged
Merged
Conversation
…ary; update interfaces to include details_url and target_url
…s a link with appropriate attributes for improved usability and security
Contributor
There was a problem hiding this comment.
Pull request overview
Enhances check summaries with clickable, HTML-escaped links to check details.
Changes:
- Adds
details_urlandtarget_urlfields. - Updates summary rendering and generated bundles.
- Adds link-rendering tests.
- Requires restricting emitted URLs to
http:/https:or falling back to plain IDs.
Reviewed changes
Copilot reviewed 4 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Summary |
|---|---|
src/statuses/statusesInterfaces.ts |
Adds status target URL typing. |
src/checks/checksInterfaces.ts |
Adds check detail URL typing. |
src/checks/checks.ts |
Formats linked check IDs and updates summaries. |
dist/index.js |
Updated bundled runtime. |
dist/checks/checks.js.map |
Updated source map. |
dist/checks/checks.js |
Updated compiled checks logic. |
__tests__/checks/checks.test.ts |
Tests linked check and status IDs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
From discussion at #114
This pull request enhances the rendering of check IDs in job and commit status summaries by displaying them as clickable links when a details URL is available. It also introduces a utility for HTML escaping to ensure safe rendering in markdown tables. In addition, there are minor code style improvements and expanded test coverage to verify the new behavior.
Enhancements to summary rendering:
escapeHtmlutility function and aformatCheckIdForSummaryfunction insrc/checks/checks.tsto safely render check IDs as HTML links if a URL is available. This ensures that check IDs in the summary tables are clickable and secure.details_urlortarget_urlis present.Test coverage improvements:
__tests__/checks/checks.test.tsto verify that check IDs are rendered as links in the summary when a details or target URL is provided, for both GitHub Actions checks and commit status checks. [1] [2]