Remove reactions, which are not supported by integrations

This commit is contained in:
Brandon Keepers
2016-11-20 21:31:36 -06:00
parent 84f33fd454
commit 90708f3fba
4 changed files with 1 additions and 37 deletions

View File

@@ -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.

View File

@@ -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;
}
}

View File

@@ -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");

View File

@@ -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'
});
});
});
});