File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -246,6 +246,18 @@ class Issue extends Requestable {
246246 deleteLabel ( label , cb ) {
247247 return this . _request ( 'DELETE' , `/repos/${ this . __repository } /labels/${ label } ` , null , cb ) ;
248248 }
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+ }
249261}
250262
251263module . exports = Issue ;
You can’t perform that action at this time.
0 commit comments