check-code-coverage
Advanced tools
Comparing version
@@ -127,3 +127,5 @@ #!/usr/bin/env node | ||
repository: process.env.GITHUB_REPOSITORY, | ||
sha: process.env.GITHUB_SHA | ||
// allow overriding the commit SHA, useful in pull requests | ||
// where we want a merged commit SHA from GH event | ||
sha: process.env.GH_SHA || process.env.GITHUB_SHA | ||
} | ||
@@ -130,0 +132,0 @@ setGitHubCommitStatus(options, envOptions).catch(e => { |
{ | ||
"name": "check-code-coverage", | ||
"version": "1.9.0", | ||
"version": "1.9.1", | ||
"description": "Utilities for checking the coverage produced by NYC against extra or missing files", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -112,2 +112,14 @@ # check-code-coverage [![ci status][ci image]][ci url]  | ||
### Pull requests | ||
When setting a status on a GitHub pull request, you need to use SHA of the merged commit. You can pass it as `GH_SHA` environment variable. | ||
```yaml | ||
- name: Ensure coverage has not dropped 📈 | ||
run: npx set-gh-status --check-against-readme | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GH_SHA: ${{ github.event.after }} | ||
``` | ||
## Debug | ||
@@ -114,0 +126,0 @@ |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
19031
2.66%406
0.5%130
10.17%11
10%