travis-builds-reporter-utils
    TypeScript icon, indicating that this package has built-in type declarations

    0.2.0 • Public • Published

    Introduction

    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:

    1. Install this package in your project as a dependency. Type this in your favourite terminal/prompt):
      npm i -S travis-builds-reporter-utils
    2. In a *.js file in your project:
      1. Require the module contained in this package.
      const buildsUtils = require('travis-builds-reporter-utils');
      1. Use it with a builds array:
      // ...
      // retrieve builds in some ways
      // for example by using travis-builds-reporter-core
      console.log(`Total builds count: ${buildsUtils.getBuildsCount(builds)}`);
      if (buildsUtils.getSuccessfulBuildsRate(builds) > 0.6) {
         alert('Good boy!');
      } else {
         alert('No good my friend, no good...');
      }

    Module Details

    Take a look at the autogenerated docs.

    What's next?

    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.

    Install

    npm i travis-builds-reporter-utils

    DownloadsWeekly Downloads

    5

    Version

    0.2.0

    License

    MIT

    Unpacked Size

    16.5 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar