node-zenhub

1.2.2 • Public • Published

node-zenhub

npm version Build Status Coverage Status Dependencies Status BCH compliance Workflow status

A Node.js wrapper for the ZenHub API

Install

node-zenhub is available on npm and as such, can be installed through npm with ease.

To install node-zenhub and add it to your package.json file, use the following command:

$ npm install --save node-zenhub

Documentation

The official ZenHub documentation

Usage

In order to use node-zenhub you will need to generate an API token on the ZenHub website. Once you have this, add the library to your project with the following command:

$ npm install --save node-zenhub

Once installed you need to instantiate a new copy of node-zenhub in your application, like so:

var callback = function (error, data) {
    console.log(error);
    console.log(data);
}
 
var ZenHub = require('node-zenhub'),
    api = new ZenHub('[token]', [zenhub_api_url]);
 
api.boards.getBoard('[repoId]', callback);

Note: replace [token] with your token.

Note: [zenhub_api_url] is optional, you can use it with enterprise versions with custom URL

Available methods

Issues

Boards

Epics

Milestones

Release Reports

Running the Tests

The tests are based on the mocha module, which may be installed via npm. To run the tests make sure that the npm dependencies are installed by running npm install from the project directory.

create file test/config.json from test/config.sample.json with your values

{
    "token": "xxxxxxxxxx",
    "repoId": "xxxxx",
    "issueId": 1,
    "milestoneNumber": 1,
    "releaseId": "59d3cd520a430a6344fd3bdb",
    "zenhubAPI": "https://zenhub.enterprise.com"
}

At the moment, test classes can only be run separately. This will e.g. run the Issues Api test:

npm test

Issues

Please raise an issue on GitHub with as much information as possible and the steps to replicate (if possible).

LICENSE

MIT license. See the LICENSE file for details.


Fork me on github

Created by @ilbonzo

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.2.2
    0
    • latest

Version History

Package Sidebar

Install

npm i node-zenhub

Weekly Downloads

0

Version

1.2.2

License

MIT

Unpacked Size

22.9 kB

Total Files

14

Last publish

Collaborators

  • ilbonzo