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

Skip non-relevant webhook events #1280

Merged
merged 1 commit into from
Oct 25, 2023
Merged

Skip non-relevant webhook events #1280

merged 1 commit into from
Oct 25, 2023

Conversation

jhrozek
Copy link
Contributor

@jhrozek jhrozek commented Oct 24, 2023

This patch makes mediator more strict when it comes to mapping webhook
events, as not all events should trigger entity evaluation. Previously,
we have been using repo evaluation as sort of a fallback, but in busy
repositories with many PRs and issues, this could cause mediator to just
spin all the time.

Fixes: #1267

rdimitrov
rdimitrov previously approved these changes Oct 25, 2023
JAORMX
JAORMX previously approved these changes Oct 25, 2023
Copy link
Contributor

@JAORMX JAORMX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice

This patch makes mediator more strict when it comes to mapping webhook
events, as not all events should trigger entity evaluation. Previously,
we have been using repo evaluation as sort of a fallback, but in busy
repositories with many PRs and issues, this could cause mediator to just
spin all the time.

Fixes: #1267
@jhrozek
Copy link
Contributor Author

jhrozek commented Oct 25, 2023

rebased. I removed the very recently added errPrNotHandled in favour of just using errNotHandled as well.

@jhrozek jhrozek merged commit ebb27e3 into stacklok:main Oct 25, 2023
12 checks passed
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

Successfully merging this pull request may close these issues.

bug: ignore unknown X-GitHub-Event web hook events we don't care about
3 participants