We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 22b889c commit 1ffd44dCopy full SHA for 1ffd44d
1 file changed
lib/Issue.js
@@ -246,6 +246,18 @@ class Issue extends Requestable {
246
deleteLabel(label, cb) {
247
return this._request('DELETE', `/repos/${this.__repository}/labels/${label}`, null, cb);
248
}
249
+
250
+ /**
251
+ * Add label to an issue
252
+ * @see https://developer.github.com/v3/issues/labels/#add-labels-to-an-issue
253
+ * @param {number} issue - the id of the issue to comment on
254
+ * @param {string} label - the name of the label to add to the issue
255
+ * @param {Requestable.callback} [cb] - will receive the status
256
+ * @return {Promise} - the promise for the http request
257
+ */
258
+ addLabel(issue, label, cb) {
259
+ return this._request('POST', `/repos/${this.__repository}/issues/${issue}/labels`, label, cb);
260
+ }
261
262
263
module.exports = Issue;
0 commit comments