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
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
},
"rules": {
"eslint-comments/no-use": "off",
"i18n-text/no-en": "off",
"import/no-namespace": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ on:
branches:
- master
- main
permissions:
contents: read
pull-requests: write
jobs:
coverage:
runs-on: ubuntu-latest
Expand All @@ -28,6 +31,10 @@ jobs:
coverageFile: path/to/coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
```

### Required Permissions

The action needs `pull-requests: write` to post (and update) the coverage comment, and `contents: read` to fetch the diff between base and head. If your workflow restricts the default token (e.g. via a repo-wide `permissions: read-all`), set them explicitly as shown above.
## PR Message & Job Summary 🆕

![message](./images/pr-message.png)
Expand All @@ -44,3 +51,4 @@ jobs:
| `passIcon` | ✅ | the indicator to use for files that passed | 🟢 |
| `failIcon` | ✅ | the indicator to use for files that failed | 🔴 |
| `sourceDir` | ✅ | the directory to use as the source of the coverage report | ./path/to/src |
| `title` | ✅ | heading text for the PR comment; set a unique value per matrix entry to post separate comments | Python Coverage 3.11 |
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ inputs:
sourceDir:
required: false
description: the directory to use as the source of the coverage report
title:
required: false
description: title text shown in the PR comment heading and used to match existing comments. set a unique value per matrix entry to post separate comments
default: 'Code Coverage'
runs:
using: 'node20'
using: 'node24'
main: 'dist/index.js'
branding:
icon: 'umbrella'
Expand Down
Loading
Loading