Skip to content
Merged
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ For more information on these inputs, see the [Workflow syntax for GitHub Action
- `minimum-coverage`: The minimum coverage to pass the check. Optional. Default: `0` (always passes)
- `github-token`: Set the `${{ secrets.GITHUB_TOKEN }}` token to have the action comment the coverage summary in the pull request. This token is provided by Actions, you do not need to create your own token. Optional. Default: ``
- `working-directory`: The working directory containing the source files referenced in the LCOV files. Optional. Default: `./`
- `title`: A prefix before the title "LCOV of commit..." Optional. Default: ``
- `title-prefix`: A prefix before the title "LCOV of commit..." Optional. Default: ``

### Outputs
None.
Expand Down
4 changes: 2 additions & 2 deletions dist/main/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/main/index.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async function run() {
const coverageFilesPattern = core.getInput('coverage-files');
const globber = await glob.create(coverageFilesPattern);
const coverageFiles = await globber.glob();
const title = core.getInput('title');
const titlePrefix = core.getInput('titlePrefix');

await genhtml(coverageFiles, tmpPath);

Expand All @@ -34,7 +34,7 @@ async function run() {
const details = await detail(coverageFile, octokit);
const sha = github.context.payload.pull_request.head.sha;
const shaShort = sha.substr(0, 7);
let body = `### ${title ? `${title} ` : ''}[LCOV](https://github.com/marketplace/actions/report-lcov) of commit [<code>${shaShort}</code>](${github.context.payload.pull_request.number}/commits/${sha}) during [${github.context.workflow} #${github.context.runNumber}](../actions/runs/${github.context.runId})\n<pre>${summary}\n\nFiles changed coverage rate:${details}</pre>`;
let body = `### ${titlePrefix ? `${titlePrefix} ` : ''}[LCOV](https://github.com/marketplace/actions/report-lcov) of commit [<code>${shaShort}</code>](${github.context.payload.pull_request.number}/commits/${sha}) during [${github.context.workflow} #${github.context.runNumber}](../actions/runs/${github.context.runId})\n<pre>${summary}\n\nFiles changed coverage rate:${details}</pre>`;

if (isFailure) {
body += `\n:no_entry: ${errorMessage}`;
Expand Down