travis-builds-reporter-utils is a package that makes easy to make calculations on builds retrieved by the core API.
What's in here?
You can find the source code inside the
src directory, while testing code is inside the
test directory (pretty standard staff for NodeJS pacakges).
There is a single module in this package and it includes all the functionalities:
- average, minimum and maximum builds durations (seconds)
- builds by date
- how much and which builds passed, errored and so on 😄
- successful builds rate
How do you use it?
Assuming you have an already functioning node project:
- Install this package in your project as a dependency. Type this in your favourite terminal/prompt):
npm i -S travis-builds-reporter-utils
- In a
*.jsfile in your project:
const buildsUtils = ;
- Require the module contained in this package.
// ...// retrieve builds in some ways// for example by using travis-builds-reporter-coreconsole;if buildsUtils > 06;else;
- Use it with a builds array:
Take a look at the autogenerated docs.
I consider this package pretty much feature complete.
If you have something to add or have issues, please check the issues page to see if someone has already requested your idea or open a new issue using the tag/label utils.