Gathering detailed insights and metrics for istanbul-slack-notify
Gathering detailed insights and metrics for istanbul-slack-notify
Gathering detailed insights and metrics for istanbul-slack-notify
Gathering detailed insights and metrics for istanbul-slack-notify
npm install istanbul-slack-notify
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
5 Stars
56 Commits
9 Forks
2 Watching
2 Branches
5 Contributors
Updated on 16 Aug 2022
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-19.8%
1,808
Compared to previous day
Last week
-10.7%
12,134
Compared to previous week
Last month
14.2%
56,197
Compared to previous month
Last year
-30.4%
3,171,263
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 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 "haltOnFailure": true 9 }
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
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
Found 2/11 approved changesets -- score normalized to 1
Reason
9 existing vulnerabilities detected
Details
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 2024-11-18
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