Skip to content

Update workflow: fetch full history and stage moves#1

Open
ClasherDasher wants to merge 5 commits intoOutOfBears:mainfrom
ClasherDasher:fix/update-workflow-stage-moves
Open

Update workflow: fetch full history and stage moves#1
ClasherDasher wants to merge 5 commits intoOutOfBears:mainfrom
ClasherDasher:fix/update-workflow-stage-moves

Conversation

@ClasherDasher
Copy link

Improves the update workflow by fetching full git history (fetch-depth: 0) and
staging changes with git add -A data docs README.md so file moves/deletes
(e.g., moving old releases into Old/) are properly committed.

notify.js could throw when a changed .json file didn’t match the expected
data/release-###.json pattern (file.match(...)[1] on a null match).

This change guards the regex match and skips unrelated JSON files instead
of crashing. Also avoids re-reading the same file content from git, handles
missing HEAD~1 (first commit/shallow clones) gracefully, and switches to
standard non-zero exit codes while closing Redis connections on exit.
update.js could crash if Roblox changed the release-notes navigation shape or
a path didn’t match /release-notes-(\d+)/ (match()[1] on null).

This refactor adds safe version parsing, basic fetch response checks, and more
defensive access to Next.js data fields. It also caps the number of versions
processed (to match the repo’s “recent versions” intent) and simplifies the
Promise flow so results are deterministic.
@ClasherDasher
Copy link
Author

Tested in Codespaces: pnpm install, node --check src/*.js, ran node src/update.js successfully (latest version printed, Old/New files generated as expected)

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