dist/lib/label.js
function createLabel(_ref, name, color) {
  var api = _ref.api;
  var token = _ref.token;
  var repo = _ref.repo;

  return (0, _request2.default)({
    headers: { 'User-Agent': 'request', 'Authorization': 'token ' + token },
    url: api + '/' + repo + '/labels',
    form: JSON.stringify({ name: name, color: color }),
    method: 'POST',
    json: true
  });
}
function createLabel(_ref, name, color) {
  var api = _ref.api;
  var token = _ref.token;
  var repo = _ref.repo;

  return (0, _request2.default)({
    headers: { 'User-Agent': 'request', 'Authorization': 'token ' + token },
    url: api + '/' + repo + '/labels',
    form: JSON.stringify({ name: name, color: color }),
    method: 'POST',
    json: true
  });
}
function createLabel ( _ref , name , color ) { var api = _ref . api ; var token = _ref . token ; var repo = _ref . repo ; return ( 0 , _request2 . default ) ( { headers : { 'User-Agent' : 'request' , 'Authorization' : 'token ' + token } , url : api + '/' + repo + '/labels' , form : JSON . stringify ( { name : name , color : color } ) , method : 'POST' , json : true } ) ; }
Sends a request to GitHub to create a label

@name createLabel
@function
@param {Object} server the server configuration object
@param {String} server.api the api endpoint to connect to
@param {String} server.token the api token to use
@param {String} server.repo the git repo to manipulate
@param {String} name the name of the label
@param {String} color the hexidecimal color of the label
@return {Promise}
Sends a request to GitHub to create a label