GithubHelp home page GithubHelp logo

esteban-rocha / git-label Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jasonbellamy/git-label

0.0 1.0 0.0 72 KB

Automate and simplify the creation of labels for your GitHub repositories

License: MIT License

JavaScript 100.00%

git-label's Introduction

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 )

Name Type Argument Default Description
config object <required> null the server configuration object
config.api string <required> null the api endpoint to connect to
config.token string <required> null the api token to use
config.repo string <required> null the git repo to add labels to
labels array <required> null the array of label objects

remove( config, labels )

Name Type Argument Default Description
config object <required> null the server configuration object
config.api string <required> null the api endpoint to connect to
config.token string <required> null the api token to use
config.repo string <required> null the git repo to add labels to
labels array <required> null the array of label objects

find( pattern )

Name Type Argument Default Description
pattern string <required> null the 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.

git-label's People

Contributors

jasonbellamy avatar matkoniecz avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.