chore: add a check to see what's going on with an event

Signed-off-by: Ben Lambert <blam@spotify.com>
This commit is contained in:
Ben Lambert
2022-01-20 13:05:58 +01:00
committed by Fredrik Adelöw
parent d392d2dbb3
commit 1e423fab53
+8 -1
View File
@@ -69,7 +69,14 @@ const getRepoEvents = async ({ github, context, pull_number }) => {
return events
.sort((a, b) => new Date(a.updated_at) - new Date(b.updated_at))
.filter(({ user }) => !user.login.includes('[bot]'));
.filter(({ user, ...evt }) => {
if (!user) {
console.warn('no evt', evt);
return false
}
return !user.login.includes('[bot]');
});
};
module.exports = async ({ github, context, core }) => {