-
Notifications
You must be signed in to change notification settings - Fork 0
feat: filter out dependabot notifications #599
feat: filter out dependabot notifications #599
Conversation
31a98d6
to
3df3ac1
Compare
src/slackbot.js
Outdated
excludedAuthors.includes(node.content?.author?.login) || | ||
excludedAuthors.includes(node.content?.content?.author?.login) || | ||
excludedAuthors.includes(node.content?.creator?.login) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we checking in so many places? surely the dependabot PRs will carry this information consistently in a single place, don't they?
test/routes/webhook.test.js
Outdated
}, | ||
}) | ||
|
||
t.test('item created by dependabot', async t => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we improve these tests' descriptions by including what the outcome of the test is? e.g. "doesn't do anything if it's dependabot PR".
test/routes/webhook.test.js
Outdated
'X-Hub-Signature-256': signature, | ||
}, | ||
}) | ||
t.equal(slackStub.callCount, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor but can we use sinon to make these assertions? e.g. sinon.assertNotCalled(slackStub)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Sinon assertion doesn't increment the tap report assertion counter.
I reverted it, but I am happy to restore it.
src/graphql.js
Outdated
@@ -106,6 +106,10 @@ export const getActivityById = async ({ graphqlClient, id }) => { | |||
number | |||
title | |||
url | |||
author { | |||
url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need the author url?
closes #587