EddieHubCommunity / EddieHubLive

Map to show EddieHub contributors
https://live.eddiehub.io
MIT License
47 stars 39 forks source link

Hide GitHub Action events #30

Closed eddiejaoude closed 2 years ago

eddiejaoude commented 2 years ago

Description

Filter out these 3 events

Screenshots

No response

Additional information

No response

Chris-N commented 2 years ago

Happy to find a good solid first issue. So where can I get more information/understanding the GitHub Action events. I'm also trying to understand where can I find these 3 events you want filtered out at? 🤔

eddiejaoude commented 2 years ago

Great questions Chris! I think we want to stop those Action events being added to the list and map on this line https://github.com/EddieHubCommunity/EddieHubLive/blob/main/src/App.js#L12

Maybe having something like this (untested code)

const ignoreEvents = ['workflowRun', 'checksuite', 'checkRun'];
if (ignoreEvents.includes(data.event) {
   return;
}

That way those 3 events are not displayed on the list or map.

Chris-N commented 2 years ago

Thanks for the context! At the same time with this comment I'm testing out the GitHub webhook event to fire from the suggestion you left on discord until Naomi writes up a doc procedure to simulate this with curl... command.

Chris-N commented 2 years ago

Is there a defined shape of the data that comes through from the webhook somewhere?

eddiejaoude commented 2 years ago

Yes there are examples in the GitHub docs here https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads