fix: fetch full git history for last-modified timestamps#2998
Merged
bartlomieju merged 1 commit intomainfrom Mar 27, 2026
Merged
fix: fetch full git history for last-modified timestamps#2998bartlomieju merged 1 commit intomainfrom
bartlomieju merged 1 commit intomainfrom
Conversation
The checkout step defaults to fetch-depth: 1 (shallow clone), which means `git log` in the Lume preprocessor only sees one commit and almost no files get a lastModified date. Use fetch-depth: 0 to get full history. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
crowlKats
approved these changes
Mar 27, 2026
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.
Summary
git logreturns almost nothinglastModified.jsonfrom full git history as a separate build step, commit it to the repo, and have the Lume preprocessor read from it instead of spawning gitlastModified.jsonon each push to main (with[skip ci]to avoid loops)Changes
scripts/generate_last_modified.ts— standalone script that runsgit logand writes the JSON map_config.ts— preprocessor reads from JSON file instead of running git; warns gracefully if file missingdeno.json— newgenerate:last-modifiedtask, added tobuildandbuild:light.github/workflows/lint.yml— generates JSON before build; commits updated JSON on main pusheslastModified.json— initial generated data (2375 entries)Test plan
/runtime/fundamentals/typescript/)🤖 Generated with Claude Code