Repository navigation
Ping Discord on new shard recipes, sync within ~15 min of upstream - #3
Merged
Merged
Conversation
- 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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
What
scripts/notify-discord.mjscompares 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.ymlsaves a copy offusion-data.jsonbefore the sync and runs the notifier after Publish (publishorreview). It usescontinue-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 upstreamdist/fusion-data.jsonwith ours onmain(the sync saves that file byte for byte) and startssync-data.ymlonly 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
DISCORD_WEBHOOK_URL(required for pings)DISCORD_PING_ID(optional): a user ID, orrole:<role id>Tested
node --test scripts/sync-data.test.mjs scripts/notify-discord.test.mjs: 24/24 passfusion-data.jsonbuilds the expected embed (4,786 recipes, 4 new shards)4692eef…), so the watcher would do nothing right now🤖 Generated with Claude Code