fix(actions): populate github.event for scheduled runs#38446
Merged
silverwind merged 3 commits intoJul 14, 2026
Conversation
A scheduled run stored a nil event payload, so github.event.repository, .sender and .organization were absent in scheduled workflows — unlike every other event and unlike GitHub Actions. Synthesize them when materializing the run, fresh per fire. Co-Authored-By: Claude (Opus 4.8) <noreply@anthropic.com>
380b2d5 to
1ea6f82
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates scheduled Actions runs so github.event is populated with repository, sender, and (when applicable) organization, aligning scheduled runs with the payload shape other events provide and what GitHub Actions exposes.
Changes:
- Synthesize
github.event.repository/sender/organizationfor schedule-triggered runs inCreateScheduleTask. - Extend
withScheduleInEventPayloadto merge arbitrary fields into the event payload (in addition toschedule). - Update and expand unit tests for
withScheduleInEventPayloadto cover merged fields.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| services/actions/schedule_tasks.go | Synthesizes schedule event payload fields and merges them into the stored event JSON. |
| services/actions/schedule_tasks_test.go | Adapts tests to new helper signature and adds coverage for merged repository/sender/organization fields. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
delvh
approved these changes
Jul 14, 2026
bircni
approved these changes
Jul 14, 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.
Scheduled runs stored a
nullevent payload, sogithub.event.repository/sender/organizationwere empty in scheduled workflows. Every other event carries them, and so does GitHub Actions.CreateScheduleTasknow synthesizes them.