-
Notifications
You must be signed in to change notification settings - Fork 30
fix(webhook): move skip check to after hook creation #1366
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1366 +/- ##
==========================================
- Coverage 58.15% 58.15% -0.01%
==========================================
Files 634 634
Lines 24589 24591 +2
==========================================
Hits 14300 14300
- Misses 9639 9641 +2
Partials 650 650
🚀 New features to boost your workflow:
|
wass3rw3rk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a fan of this solution, we're now potentially doing a whole lot of work for a hook that won't produce a build, aren't we?
we do the same for events not allowed, builds that get skipped due to no matching rulesets, and repos that are no longer active — all of which happen far more frequently |
sure - we should add a story to deal with those (and any other) scenarios where we do unnecessary work 🙈 |
Yeah but ultimately we are relaying information to the user with some sort of stateful object (Hook) to show in the audit tab. All that takes place beforehand is the following:
I'd argue all of those are necessary except maybe 3. I am of the opinion that whenever our application is rejecting / skipping a build, it should show up in the |
Totally, the goal of the PR is great and needed! |
|
In the spirit of moving forward, I agree that the only change that probably makes sense is to skip UpdateRepo when the build is skipped. Even better probably, is to only call UpdateRepo if there are actually changes. |
Moving this skip check down will relay skipped message to the users in the audit tab rather than burying it in the webhook API responses.