Skip to content

Fetch the map-schedule from arctrackers.io#225

Open
baschny wants to merge 10 commits intoRaidTheory:mainfrom
baschny:schedule-from-api
Open

Fetch the map-schedule from arctrackers.io#225
baschny wants to merge 10 commits intoRaidTheory:mainfrom
baschny:schedule-from-api

Conversation

@baschny
Copy link
Contributor

@baschny baschny commented Jan 27, 2026

Summary

This PR introduces automated synchronization of map event data from the arctracker.io API, eliminating the need for manual updates.

Changes

Automation Script (scripts/update-map-events.js)

  • Fetches current rotation schedule and event localizations from https://arctracker.io/api/map-events
  • Transforms API response into the repository's map-events.json structure
  • Preserves local event type metadata (icons, descriptions) while updating schedules and translations
  • Validates that all event types referenced in the schedule exist in the configuration

GitHub Actions Workflow (.github/workflows/update-map-events.yml)

  • Manually triggered workflow to fetch latest map events
  • Configurable branch names for automation and PR target
  • Creates a pull request automatically if changes are detected
  • Labeled with automation tag for easy filtering
  • Skips PR creation if no changes occurred

Formatting Configuration

  • Extended Prettier config to handle map-events.json structure
  • Numeric sorting for hour keys in schedules (e.g., "0", "1", "2"...)
  • Deterministic field ordering for eventTypes and schedule objects

Package Scripts

  • bun run map-events:update – runs the update script and reformats the output
  • bun run map-events:format – standalone formatter for map events file

New Event Types

  • Added support for bird-city event type in the dataset

As soon as this is merged, in your Github project there will be a new "Action" which can be triggered manually:

Bildschirmfoto 2026-01-27 um 22 37 19

So we can push this button from "time to time" at first. If this works out good, we could automate that further, making the workflow a scheduled workflow, maybe even also merging the pull request instead of just opening it.

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.

1 participant