Skip to content

Ping Discord on new shard recipes, sync within ~15 min of upstream - #3

Merged
lyn1dev merged 1 commit into
mainfrom
discord-shard-alerts
Nov 22, 2026
Merged

lyn1dev merged 1 commit into
mainfrom
discord-shard-alerts

Conversation

@lyn1dev

@lyn1dev lyn1dev commented Nov 22, 2026

Copy link
Copy Markdown
Owner

What

  • scripts/notify-discord.mjs compares the fusion data from before and after a sync and posts new shards and new recipes (grouped by output shard) to a Discord webhook. It sends nothing when no recipes were added. Changes held for review are marked "held for review".
  • sync-data.yml saves a copy of fusion-data.json before the sync and runs the notifier after Publish (publish or review). It uses continue-on-error, so a Discord outage doesn't fail the sync, and it skips if the secret isn't set.
  • watch-fusion-data.yml (new) runs every 15 minutes. It compares the blob SHA of upstream dist/fusion-data.json with ours on main (the sync saves that file byte for byte) and starts sync-data.yml only when they differ. An actions cache key per upstream SHA makes sure each version starts the sync once, so a change held for review won't start a new sync every 15 minutes. The 6-hour schedule still retries those.

Setup after merge

  • Secret DISCORD_WEBHOOK_URL (required for pings)
  • Secret DISCORD_PING_ID (optional): a user ID, or role:<role id>
  • Settings → Actions → General → Workflow permissions must allow read and write so the watcher can start the sync

Tested

  • node --test scripts/sync-data.test.mjs scripts/notify-discord.test.mjs: 24/24 pass
  • Dry run against an older fusion-data.json builds the expected embed (4,786 recipes, 4 new shards)
  • Upstream and local blob SHAs currently match (4692eef…), so the watcher would do nothing right now
  • The workflows themselves haven't run on GitHub yet

🤖 Generated with Claude Code

- scripts/notify-discord.mjs: diff old vs new fusion-data.json and post new
  shards/recipes to DISCORD_WEBHOOK_URL, with an optional DISCORD_PING_ID mention.
- sync-data.yml: snapshot fusion data before the sync, notify after publish/review.
- watch-fusion-data.yml: every 15 minutes, compare SkyShards-Parser's
  fusion-data.json blob SHA with ours and run the sync once per new version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
shard-flipper Ready Ready Preview Nov 22, 2026 10:03pm UTC

@lyn1dev
lyn1dev merged commit 4df11bf into main Nov 22, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — 3fcee0ed Deployed Nov 22, 2026 by vercel[bot]
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