Skip to content

Commit

Permalink
fix: add {spam: true} and account info to context when logging abou…
Browse files Browse the repository at this point in the history
…t spam accounts
  • Loading branch information
gr2m committed Dec 14, 2020
1 parent f2c25c4 commit e55c32a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/handle-pull-request-change.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,15 @@ async function handlePullRequestChange(app, context) {
);

if (isSpam) {
context.log.info(`SPAM: Ignoring 404 for account: ${accountName}`);
context.log.info(
{
spam: true,
account: repo.owner.id,
accountType: repo.owner.type.toLowerCase(),
accountName: repo.owner.login,
},
`SPAM: Ignoring 404 for account: ${accountName}`
);
return;
}
}
Expand Down

1 comment on commit e55c32a

@vercel
Copy link

@vercel vercel bot commented on e55c32a Dec 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

Please sign in to comment.