Fix an issue where the bot doesn't ignore its own comments (#73)

This commit is contained in:
Ross Brodbeck
2020-05-18 20:33:59 -04:00
committed by GitHub
parent 5ce6b77f2c
commit 96b682d29f
3 changed files with 43 additions and 5 deletions

5
dist/index.js vendored
View File

@@ -8570,8 +8570,9 @@ class IssueProcessor {
this.operationsLeft -= 1;
// find any comments since the stale label
const comments = yield this.listIssueComments(issue.number, sinceDate);
// if there are any user comments returned, issue is not stale anymore
return comments.filter(comment => comment.user.type === 'User').length > 0;
// if there are any user comments returned, and they were not by this bot, the issue is not stale anymore
return (comments.filter(comment => comment.user.type === 'User' &&
comment.user.login !== github.context.actor).length > 0);
});
}
// grab comments for an issue since a given date