Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle the ping github event #291

Open
rgl opened this issue Sep 22, 2024 · 1 comment
Open

handle the ping github event #291

rgl opened this issue Sep 22, 2024 · 1 comment

Comments

@rgl
Copy link

rgl commented Sep 22, 2024

after adding a repo with:

./garm-cli repo add \
  --credentials rgl \
  --owner rgl \
  --name terraform-azure-garm-example-repository \
  --install-webhook \
  --random-webhook-secret

the garm logs started to show these log lines:

time=2024-09-22T06:39:06.868Z level=INFO msg="ignoring unknown event" gh_event=ping

can garm handle them instead of logging them as a unknown event?

@gabriel-samfira
Copy link
Member

Hi @rgl

Sure. We never did because we return 200 even if we ignore the event. The ping event is sent after a webhook is added in github to confirm that the endpoint is there and accepts connections. If the endpoint returns 200, in Github you will have a green checkmark confirming it works. I don't think github sends any other pings unless requested.

On our side there is nothing we need to do with that ping except log it. Maybe change the log message to not say "unknown".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants