Skip to content

Commit 53aba86

Browse files
bartosz347oacikzgosalvez
authored
Fixes and improvements to v3 (#85)
* Add option to update the PR comment instead of creating a new one * Revert to previous lcov-total version to support CommonJS * Adjust to changes in GitHub API package * Allow defining custom message added to comment * Fixes License link * Minor formatting and copy changes * Resolves conflicts --------- Co-authored-by: Oguzcan Acik <oguzcan_acik@hotmail.com> Co-authored-by: Zennon Gosalvez <1798166+zgosalvez@users.noreply.github.com>
1 parent 1750a94 commit 53aba86

File tree

10 files changed

+3304
-4948
lines changed

10 files changed

+3304
-4948
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ 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-prefix`: A prefix before the title "LCOV of commit..." Optional. Default: ``
20+
- `title-prefix`: A prefix before the title "LCOV of commit...". Optional. Default: ``
21+
- `additional-message`: Custom text appended to the code coverage comment in the pull request. Optional. Default: ``
22+
- `update-comment`: Set to `true` to update the previous code coverage comment if such exists. When set to `false`, a new comment is always created. Optional. Default: `false`
2123

2224
### Outputs
2325
- `total-coverage`: The total coverage from scanned files.
@@ -51,6 +53,7 @@ jobs:
5153
artifact-name: code-coverage-report
5254
github-token: ${{ secrets.GITHUB_TOKEN }}
5355
working-directory: apps/my-first-app
56+
update-comment: true
5457
```
5558
*Note:* Only the `pull_request` and `pull_request_target` events are supported. This action does nothing when triggered by other event types.
5659

@@ -59,4 +62,4 @@ jobs:
5962
This is used in my opinionated [GitHub Actions: Flutter Workflows](https://github.com/zgosalvez/github-actions-flutter-workflows) repository along with other actions for a complete end-to-end DevOps experience.
6063

6164
## License
62-
The scripts and documentation in this project are released under the [MIT License](LICENSE)
65+
The scripts and documentation in this project are released under the [MIT License](LICENSE.md)

action.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,15 @@ inputs:
1717
working-directory:
1818
description: 'The working directory containing the source files referenced in the LCOV files. Optional. Default: `./`'
1919
title-prefix:
20-
description: 'A prefix before the title "LCOV of commit..." Optional. Default: ``'
20+
description: 'A prefix before the title "LCOV of commit...". Optional. Default: ``'
2121
required: false
22+
additional-message:
23+
description: 'Custom text appended to the code coverage comment in the pull request. Optional. Default: ``'
24+
required: false
25+
update-comment:
26+
description: 'Set to `true` to update the previous code coverage comment if such exists. When set to `false`, a new comment is always created. Optional. Default: `false`'
27+
required: false
28+
default: "false"
2229
outputs:
2330
total-coverage:
2431
description: 'The total coverage from scanned files.'

0 commit comments

Comments
 (0)