Skip to content

Commit 345fd2d

Browse files
committed
Add removeLabel() to remove a label from an issue
1 parent 1ffd44d commit 345fd2d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/Issue.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,18 @@ class Issue extends Requestable {
258258
addLabel(issue, label, cb) {
259259
return this._request('POST', `/repos/${this.__repository}/issues/${issue}/labels`, label, cb);
260260
}
261+
262+
/**
263+
* Add label to an issue
264+
* @see https://developer.github.com/v3/issues/labels/#remove-a-label-from-an-issue
265+
* @param {number} issue - the id of the issue to comment on
266+
* @param {string} label - the name of the label to remove to the issue
267+
* @param {Requestable.callback} [cb] - will receive the status
268+
* @return {Promise} - the promise for the http request
269+
*/
270+
removeLabel(issue, label, cb) {
271+
return this._request('DELETE', `/repos/${this.__repository}/issues/${issue}/labels/${label}`, null, cb);
272+
}
261273
}
262274

263275
module.exports = Issue;

0 commit comments

Comments
 (0)
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