diff --git a/components/GitHubEvent.tsx b/components/GitHubEvent.tsx index 47f08f7..fa429e4 100644 --- a/components/GitHubEvent.tsx +++ b/components/GitHubEvent.tsx @@ -8,7 +8,8 @@ import { GitHubEvent } from '../util'; function GitHubEventComponent(props: GitHubEvent): JSX.Element { const { type, actor, repo, payload, created_at } = props; const timePassed = moment(created_at).fromNow(); - const userLink = !actor.login.includes('[bot]') ? {`@${actor.login}`} : actor.login; + const userLink = {`@${actor.login}`}; + return ( <> {/*
*/} diff --git a/pages/index.tsx b/pages/index.tsx index c6c649c..cc4250f 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -102,9 +102,17 @@ export default function Home({

this is a live feed of our {numRepos} repositories

- {recentEvents.map((event: GitHubEvent) => ( - - ))} + {recentEvents + // Filter to remove bot accounts (dependabot, etc) + .filter( + (event: GitHubEvent) => + !['[bot]'].some((botAccount) => + event.actor.login.includes(botAccount), + ), + ) + .map((event: GitHubEvent) => ( + + ))}

see more activity{' '} on our org!