refactor(webhook): add persistent keys in logs - #5030
Merged
npalm merged 2 commits intoMar 10, 2026
Conversation
edersonbrilhante
marked this pull request as ready for review
February 13, 2026 10:54
edersonbrilhante
force-pushed
the
feat-log-persistent-keys
branch
2 times, most recently
from
March 6, 2026 23:11
8b62efd to
9467eeb
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the webhook EventBridge publishing path to reuse the shared readEvent helper so that persistent GitHub-related logging fields are populated consistently across webhook handlers.
Changes:
- Pass
allowedEventsintoreadEventand reuse it frompublishOnEventBridgeinstead of directly reading headers + callingcheckEventIsSupported. - Update
publishForRunnersto call the newreadEventsignature with an explicit['workflow_job']allow-list. - Refactor
readEventto accept anallowedEventsparameter and use it for event-type validation.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
npalm
reviewed
Mar 9, 2026
npalm
left a comment
Member
There was a problem hiding this comment.
@edersonbrilhante pr looks good, but the title is a bit cryptic to me. Would call it refactor(webhook): ...
Contributor
Author
|
I changed the title. I didn't see as a refactor, more like a small change to use same payload in log for call using eventbridge or direct events |
edersonbrilhante
force-pushed
the
feat-log-persistent-keys
branch
from
March 9, 2026 20:56
a66f251 to
5c3eaee
Compare
npalm
approved these changes
Mar 10, 2026
Brend-Smits
pushed a commit
that referenced
this pull request
Mar 11, 2026
## Summary Update `publishOnEventBridge` to use the existing `readEvent` helper instead of directly reading the `x-github-event` header and calling `checkEventIsSupported`. Only `eventType` is destructured from `readEvent`, since the parsed event object isn’t needed. ## Why This makes the EventBridge path consistent with `publishForRunners`, ensuring persistent logging fields (repository, action, workflow job name, status, etc.) are added to the logger in both code paths. ## Impact * No functional changes * Consistent logging behavior * Removes duplicate event parsing logic
Brend-Smits
pushed a commit
that referenced
this pull request
Apr 1, 2026
## Summary Update `publishOnEventBridge` to use the existing `readEvent` helper instead of directly reading the `x-github-event` header and calling `checkEventIsSupported`. Only `eventType` is destructured from `readEvent`, since the parsed event object isn’t needed. ## Why This makes the EventBridge path consistent with `publishForRunners`, ensuring persistent logging fields (repository, action, workflow job name, status, etc.) are added to the logger in both code paths. ## Impact * No functional changes * Consistent logging behavior * Removes duplicate event parsing logic
LudovicTOURMAN
pushed a commit
to doctolib-lab/terraform-aws-github-runner
that referenced
this pull request
Apr 7, 2026
## Summary Update `publishOnEventBridge` to use the existing `readEvent` helper instead of directly reading the `x-github-event` header and calling `checkEventIsSupported`. Only `eventType` is destructured from `readEvent`, since the parsed event object isn’t needed. ## Why This makes the EventBridge path consistent with `publishForRunners`, ensuring persistent logging fields (repository, action, workflow job name, status, etc.) are added to the logger in both code paths. ## Impact * No functional changes * Consistent logging behavior * Removes duplicate event parsing logic
This was referenced Jun 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Update
publishOnEventBridgeto use the existingreadEventhelper instead of directly reading thex-github-eventheader and callingcheckEventIsSupported.Only
eventTypeis destructured fromreadEvent, since the parsed event object isn’t needed.Why
This makes the EventBridge path consistent with
publishForRunners, ensuring persistent logging fields (repository, action, workflow job name, status, etc.) are added to the logger in both code paths.Impact