-
Notifications
You must be signed in to change notification settings - Fork 628
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
Prevent that lambda webhook fails when it tries to process a installation_repositories event #2210
Comments
Thanks for creating the issue. Would be strange if you are not allowed ot create a PR. THe repo is fully open source, no restriction on who can make a PR. Please can you try it again and submit a PR? |
Hello @npalm I'm trying to push my changes to a branch - it seems that my user doesn't have enough rights to do it:
Cheers, Javier G. |
@jgutierrezglez you have to fork this repository, push your changes to that, then open a PR from your fork to this repository |
Omdeed the normal process in GitHub is just create a fork, push your changes to your fork (new branch or default one). Next open a PR. |
PR created: #2288 |
merged |
Hello team,
I hope you're doing well. I noticed the lambda webhook fails when it receives an installation_repositories event from GitHub. Even if in the GitHub app is configured to receive only workflow_job events - this event is still received by the application that we have created to manage our GitHub runners (our application is installed at the organizational level and any project from this organization can use it).
The error returned by the lambda in this particular scenario is the following:
There is a real quick fix that be can be applied to the webhook lambda to prevent this issue:
https://github.com/philips-labs/terraform-aws-github-runner/blob/develop/modules/webhook/lambdas/webhook/src/webhook/handler.ts#L32
if the 4 first lines of the snipped are moved just below the if (!supportedEvents.includes(githubEvent)) line
this change fixes the issue (tested already in our runners) - as the request is discarded by this condition without making that the lambda fails.
I tried to create this PR myself and submit to you - but it seems I don't have permissions to collaborate.
Thanks,
Javier G.
The text was updated successfully, but these errors were encountered: