Skip to content

fix: preserve past Discord events across automation runs#139

Merged
kordianbruck merged 1 commit intomasterfrom
copilot/investigate-event-retention-issue
Apr 11, 2026
Merged

fix: preserve past Discord events across automation runs#139
kordianbruck merged 1 commit intomasterfrom
copilot/investigate-event-retention-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 11, 2026

The fetch-event-node.yml workflow checked out the default branch (which has no scheduled_events.json) before running the script. Since the Discord API only returns active/upcoming events, the merge in get_events.js always started from an empty baseline — discarding all previously accumulated past events on every run.

Changes

  • .github/workflows/fetch-event-node.yml: Added a step before the script runs that fetches scheduled_events.json from the event-data branch into the workspace, so the existing merge logic can accumulate events correctly over time:
- name: Restore existing events
  run: |
    git fetch origin event-data || true
    git checkout origin/event-data -- scheduled_events.json || true

The || true guards handle the first-run case where the event-data branch or file doesn't yet exist. No changes to get_events.js were needed — its merge logic was already correct.

@kordianbruck kordianbruck marked this pull request as ready for review April 11, 2026 12:27
@kordianbruck kordianbruck merged commit da7414b into master Apr 11, 2026
5 checks passed
@kordianbruck kordianbruck deleted the copilot/investigate-event-retention-issue branch April 11, 2026 12:31
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.

2 participants