Update workflow: fetch full history and stage moves#1
Open
ClasherDasher wants to merge 5 commits intoOutOfBears:mainfrom
Open
Update workflow: fetch full history and stage moves#1ClasherDasher wants to merge 5 commits intoOutOfBears:mainfrom
ClasherDasher wants to merge 5 commits intoOutOfBears:mainfrom
Conversation
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.
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) |
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.
Improves the update workflow by fetching full git history (fetch-depth: 0) and
staging changes with
git add -A data docs README.mdso file moves/deletes(e.g., moving old releases into Old/) are properly committed.