Skip to content

Commit 0b08a6c

Browse files
committed
fix(comments): ignore comments from linear bot, ref #33
1 parent dd5b8a6 commit 0b08a6c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

index.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,17 @@ module.exports = (app) => {
6666
per_page: 100,
6767
issue_number: pr.number
6868
}));
69+
70+
// bots to ignore
71+
let bots = [
72+
'linear', // ref https://github.com/stilliard/github-task-list-completed/issues/33
73+
'linear[bot]',
74+
];
75+
// filter out comments from the bot
76+
comments.data = comments.data.filter(comment => {
77+
return ! bots.includes(comment.user.login);
78+
});
79+
6980
} catch (err) {
7081
if (err.status === 403) { // if we don't have access to the repo, skip entirely
7182
log(pr, `No access, skipping entirely. Error (${err.status}): ${err.message}`, 'error');

0 commit comments

Comments
 (0)