From cd6e1f17b8f1a5969bb2188882e424d0bba2b77f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 11 Apr 2026 12:25:44 +0000 Subject: [PATCH] fix: restore scheduled_events.json from event-data branch before merging Agent-Logs-Url: https://github.com/TUM-Dev/Website/sessions/3a7331eb-55ee-415a-8a9d-75159579f4b8 Co-authored-by: kordianbruck <298860+kordianbruck@users.noreply.github.com> --- .github/workflows/fetch-event-node.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/fetch-event-node.yml b/.github/workflows/fetch-event-node.yml index 7666cce..d9ea372 100644 --- a/.github/workflows/fetch-event-node.yml +++ b/.github/workflows/fetch-event-node.yml @@ -26,12 +26,18 @@ jobs: node-version: '24.x' # Or any version you prefer cache: pnpm - # Step 3: Install Node.js dependencies + # Step 3: Restore existing events from the event-data branch so past events are preserved + - name: Restore existing events + run: | + git fetch origin event-data || true + git checkout origin/event-data -- scheduled_events.json || true + + # Step 4: Install Node.js dependencies - name: Install dependencies run: pnpm install working-directory: 'automation' - # Step 4: Run the Node.js script to fetch events and save to a file + # Step 5: Run the Node.js script to fetch events and save to a file - name: Fetch and save events run: node get_events.js working-directory: 'automation' @@ -39,7 +45,7 @@ jobs: # Use the GitHub Secret we created to pass the token DISCORD_BOT_TOKEN: ${{ secrets.DISCORD_BOT_TOKEN }} - # Step 5: Commit the new JSON file back to the repository + # Step 6: Commit the new JSON file back to the repository - name: Commit and push changes run: | git config user.name github-actions