From ba5e703eb95c3d507eda0e7a772d637f126ea8b0 Mon Sep 17 00:00:00 2001 From: Aurelio De Rosa Date: Thu, 30 Jun 2016 12:14:21 +0100 Subject: [PATCH] feature(issue): add createLabel fixes #328 --- lib/Issue.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/Issue.js b/lib/Issue.js index d5c03d4a..07fa2b1a 100644 --- a/lib/Issue.js +++ b/lib/Issue.js @@ -190,6 +190,17 @@ class Issue extends Requestable { deleteMilestone(milestone, cb) { return this._request('DELETE', `/repos/${this.__repository}/milestones/${milestone}`, null, cb); } + + /** + * Create a new label + * @see https://developer.github.com/v3/issues/labels/#create-a-label + * @param {Object} labelData - the label definition + * @param {Requestable.callback} [cb] - will receive the object representing the label + * @return {Promise} - the promise for the http request + */ + createLabel(labelData, cb) { + return this._request('POST', `/repos/${this.__repository}/labels`, labelData, cb); + } } module.exports = Issue; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy