Skip to content

Commit 30d0393

Browse files
committed
Probably fix it
1 parent 3c6ac5d commit 30d0393

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

index.js

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Not sure what this means? [Click here to learn what changesets are](https://git
3030
`;
3131

3232
const getCommentId = (context, params) =>
33-
context.github.issues.listComments(params).then(comments => {
33+
context.github.pullRequests.listComments(params).then(comments => {
3434
const changesetBotComment = comments.data.find(
3535
// TODO: find what the current user is in some way or something
3636
comment =>
@@ -67,8 +67,8 @@ module.exports = app => {
6767
try {
6868
const params = context.issue();
6969

70-
let number = context.payload;
71-
let repo = {
70+
let queryStuff = {
71+
pull_number: context.payload.number,
7272
owner: context.payload.repository.name,
7373
repository: context.payload.repository.owner.login
7474
};
@@ -90,15 +90,9 @@ module.exports = app => {
9090
// but reducing time is nice here so that
9191
// deploying this doesn't cost money
9292
context.payload.action === "synchronize"
93-
? getCommentId(context, {
94-
issue_number: number,
95-
...repo
96-
})
93+
? getCommentId(context, queryStuff)
9794
: null,
98-
getChangesetId(context, {
99-
pull_number: number,
100-
...repo
101-
})
95+
getChangesetId(context, queryStuff)
10296
]);
10397

10498
let prComment;

0 commit comments

Comments
 (0)