Gathering detailed insights and metrics for cp-istanbul-slack-notify
Gathering detailed insights and metrics for cp-istanbul-slack-notify
Gathering detailed insights and metrics for cp-istanbul-slack-notify
Gathering detailed insights and metrics for cp-istanbul-slack-notify
Sends nyc coverage information and pass/fail threshold to Slack
npm install cp-istanbul-slack-notify
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
5 Stars
60 Commits
9 Forks
2 Watchers
2 Branches
5 Contributors
Updated on Dec 04, 2024
Latest Version
1.0.20
Package Id
cp-istanbul-slack-notify@1.0.20
Unpacked Size
260.03 kB
Size
213.58 kB
File Count
19
NPM Version
5.6.0
Node Version
8.4.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
4
4
Sends istanbul / jest coverage summary and git build details to Slack using a pass/fail threshold for project coverage.
If SLACK_WEBHOOK is not provided it prints total coverage info to console instead
npm i --save-dev cp-istanbul-slack-notify
Do not share incoming webhook URLs in public code repositories.
You will need to configure a webhook for your Slack team: https://api.slack.com/incoming-webhooks
You must define SLACK_WEBHOOK
as an environment variable.
You can override other default settings in your package.json
by adding the following section:
1 "coverage": { 2 "threshold": 100, 3 "projectName": "Istanbul Slack Notify", 4 "repositoryUrl": "https://github.com/mattyboy/istanbul-slack-notify", 5 "coverageFiles": ["coverage/coverage-final.json"], 6 "username": "coverage-bot", 7 "channel": "#random" 8 }
Istanbul / Jest coverage report for your project must be generated first.
Passing SLACK_WEBHOOK at runtime
Define a couple of npm tasks in package.json
, assuming you only want slack notify from you CI server.
1"test": "./node_modules/.bin/jest --coverage", 2"test-ci": "npm test && ./node_modules/.bin/istanbul-slack-notify",
Then run tests on your CI server as follows.
1export SLACK_WEBHOOK=https://hooks.slack.com/xxxxx 2SLACK_WEBHOOK=$SLACK_WEBHOOK npm run test-ci
Note: If you don't set the SLACK_WEBHOOK it will print totals coverage to console instead
Defining SLACK_WEBHOOK in package.json
While you can do this be sure it isn't in a public repo as you will expose your slack webhook url.
1"test": "./node_modules/.bin/jest --coverage && ./node_modules/.bin/istanbul-slack-notify", 2"test-ci": "npm test && SLACK_WEBHOOK=https://hooks.slack.com/xxxxx ./node_modules/.bin/istanbul-slack-notify",
1export SLACK_WEBHOOK=https://hooks.slack.com/xxxxx 2SLACK_WEBHOOK=$SLACK_WEBHOOK ./node_modules/.bin/istanbul-slack-notify
If you have any feedback or suggestions please let me know. We use this package as part of our CI process and are open to changes that would be valuable to us and others.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
4 existing vulnerabilities detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
Found 2/14 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More