Skip to content

Commit b61bbfd

Browse files
authored
Resolves inconsistent title-prefix input (#46)
1 parent ce8a425 commit b61bbfd

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ For more information on these inputs, see the [Workflow syntax for GitHub Action
1717
- `minimum-coverage`: The minimum coverage to pass the check. Optional. Default: `0` (always passes)
1818
- `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: ``
1919
- `working-directory`: The working directory containing the source files referenced in the LCOV files. Optional. Default: `./`
20-
- `title`: A prefix before the title "LCOV of commit..." Optional. Default: ``
20+
- `title-prefix`: A prefix before the title "LCOV of commit..." Optional. Default: ``
2121

2222
### Outputs
2323
None.

dist/main/index.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/main/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ async function run() {
1717
const coverageFilesPattern = core.getInput('coverage-files');
1818
const globber = await glob.create(coverageFilesPattern);
1919
const coverageFiles = await globber.glob();
20-
const title = core.getInput('title');
20+
const titlePrefix = core.getInput('titlePrefix');
2121

2222
await genhtml(coverageFiles, tmpPath);
2323

@@ -34,7 +34,7 @@ async function run() {
3434
const details = await detail(coverageFile, octokit);
3535
const sha = github.context.payload.pull_request.head.sha;
3636
const shaShort = sha.substr(0, 7);
37-
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>`;
37+
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>`;
3838

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

0 commit comments

Comments
 (0)