CPI-0: experiments#7
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds HTML coverage report functionality to the GitHub Action, allowing it to generate and link to detailed HTML coverage reports alongside the existing coverage information. The enhancement provides users with a richer view of coverage data through interactive HTML reports.
Key changes:
- Added support for HTML coverage report links in comment body generation
- Introduced a new
additional-datainput parameter for specifying HTML report base paths - Extended GitHub API calls to include the additional data parameter
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/build-comment-body.js | Added functions to generate HTML report links for individual views and aggregated reports |
| action.yaml | Added new additional-data input parameter and passed it to the build message step and GitHub API calls |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| const buildHtmlReportLink = (checkRun) => { | ||
| if (!ctx.additionalData) return ''; | ||
|
|
||
| // Створюємо URL до HTML звіту на основі additional-data та view |
There was a problem hiding this comment.
The comment is in Ukrainian. Consider using English for consistency with the rest of the codebase.
| // Створюємо URL до HTML звіту на основі additional-data та view | |
| // Create a URL to the HTML report based on additional-data and view |
| const baseUrl = ctx.additionalData.trim(); | ||
| if (!baseUrl) return ''; | ||
|
|
||
| // Додаємо view та /html/index.html |
There was a problem hiding this comment.
The comment is in Ukrainian. Consider using English for consistency with the rest of the codebase.
| // Додаємо view та /html/index.html | |
| // Add view and /html/index.html |
|
|
||
| let result = `${workflowRunLink} | \`${formattedDate}\``; | ||
|
|
||
| // Додаємо загальний HTML report link, якщо є additional-data |
There was a problem hiding this comment.
The comment is in Ukrainian. Consider using English for consistency with the rest of the codebase.
| // Додаємо загальний HTML report link, якщо є additional-data | |
| // Add general HTML report link if there is additional-data |
| repo: context.repo.repo, | ||
| body: ${{ steps.build-message.outputs.result }} | ||
| body: ${{ steps.build-message.outputs.result }}, | ||
| link: `${{ inputs.additional-data }}` |
There was a problem hiding this comment.
The 'link' parameter is being added to the GitHub API call for updating comments, but this is not a valid parameter for the github.rest.issues.updateComment API. This will likely cause the API call to fail or ignore the parameter.
| repo: context.repo.repo, | ||
| body: ${{ steps.build-message.outputs.result }} | ||
| body: ${{ steps.build-message.outputs.result }}, | ||
| link: `${{ inputs.additional-data }}` |
There was a problem hiding this comment.
The 'link' parameter is being added to the GitHub API call for creating comments, but this is not a valid parameter for the github.rest.issues.createComment API. This will likely cause the API call to fail or ignore the parameter.
No description provided.