diff --git a/docs/configuration.md b/docs/configuration.md index 106f82c..3aa5de9 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -145,12 +145,6 @@ Add labels .unassign('defunkt'); ``` -#### `react` - -``` -.react('heart'); # or +1, -1, laugh, confused, heart, hooray -``` - --- See [examples](examples.md) for ideas of behaviors you can implement by combining these configuration options. diff --git a/lib/plugins/issues.js b/lib/plugins/issues.js index 8f88793..cf6e16a 100644 --- a/lib/plugins/issues.js +++ b/lib/plugins/issues.js @@ -47,11 +47,6 @@ const IssuePlugin = superclass => class extends superclass { return this; } - react(reaction) { - this._setCommentData({reaction}); - return this; - } - _setCommentData(obj) { if (this.issueActions === undefined) { this.issueActions = {}; @@ -143,13 +138,6 @@ class IssueEvaluator extends Evaluator { ); } - if (workflow.issueActions.reaction !== undefined) { - const reaction = workflow.issueActions.reaction; - promises.push( - context.github.reactions.createForIssue(context.payload.toIssue({content: reaction})) - ); - } - return promises; } } diff --git a/test/configuration.js b/test/configuration.js index 875cf14..cb3382a 100644 --- a/test/configuration.js +++ b/test/configuration.js @@ -7,8 +7,7 @@ const createSpy = expect.createSpy; config.content = new Buffer(` on("issues.opened") .comment("Hello World!") - .assign("bkeepers") - .react("heart"); + .assign("bkeepers"); on("issues.closed") .unassign("bkeepers"); diff --git a/test/plugins/issues.js b/test/plugins/issues.js index 0637d96..a8ec0bd 100644 --- a/test/plugins/issues.js +++ b/test/plugins/issues.js @@ -7,9 +7,6 @@ const payload = require('../fixtures/webhook/comment.created.json'); const createSpy = expect.createSpy; const github = { - reactions: { - createForIssue: createSpy() - }, issues: { lock: createSpy(), unlock: createSpy(), @@ -210,18 +207,4 @@ describe('issues plugin', () => { }); }); }); - - describe('reactions', () => { - it('react', () => { - this.w.react('heart'); - - Promise.all(this.evaluator.evaluate(this.w, context)); - expect(github.reactions.createForIssue).toHaveBeenCalledWith({ - owner: 'bkeepers-inc', - repo: 'test', - number: 6, - content: 'heart' - }); - }); - }); });