4.1.1 • Published 8 years ago

git-label v4.1.1

Weekly downloads
10
License
MIT
Repository
github
Last release
8 years ago

git-label Build Status

Automates and simplifies the creation of labels for GitHub repositories

Getting Started

  • Install with NPM - npm install --save git-label

Usage

var gitLabel = require('git-label');

var config = {
  api   : 'https://api.github.com',
  repo  : 'username/repo',
  token : 'yoursupersecretapitoken'
};

var labels = [
  { "name": "bug", "color": "#fc2929" },
  { "name": "duplicate", "color": "#cccccc" }
];

// remove specified labels from a repo
gitLabel.remove(config, labels)
  .then(console.log)  //=> success message
  .catch(console.log) //=> error message

// add specified labels to a repo
gitLabel.add(config, labels)
  .then(console.log)  //=> success message
  .catch(console.log) //=> error message

#API

add( config, labels )

NameTypeArgumentDefaultDescription
configobject<required>nullthe server configuration object
config.apistring<required>nullthe api endpoint to connect to
config.tokenstring<required>nullthe api token to use
config.repostring<required>nullthe git repo to add labels to
labelsarray<required>nullthe array of label objects

remove( config, labels )

NameTypeArgumentDefaultDescription
configobject<required>nullthe server configuration object
config.apistring<required>nullthe api endpoint to connect to
config.tokenstring<required>nullthe api token to use
config.repostring<required>nullthe git repo to add labels to
labelsarray<required>nullthe array of label objects

find( pattern )

NameTypeArgumentDefaultDescription
patternstring<required>nullthe globbing pattern to the label packages

Developing

git-label is built using ES6. Run the following task to compile the src/ into dist/.

npm run build

Related

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality.

License

Copyright (c) 2016 Jason Bellamy
Licensed under the MIT license.

4.1.1

8 years ago

4.1.0

8 years ago

4.0.0

8 years ago

3.4.0

8 years ago

3.3.0

8 years ago

3.2.0

8 years ago

3.1.3

8 years ago

3.1.2

8 years ago

3.1.1

8 years ago

3.1.0

8 years ago

3.0.1

8 years ago

2.0.2

8 years ago

3.0.0

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.0.0

8 years ago