Bug
mirror.py updates the pre-commit YAML-style rev: entries in README.md but silently skips the prek TOML-style rev = entry. After many mirror runs the prek block falls behind:
[[repos]]
repo = "https://github.com/astral-sh/ruff-pre-commit"
rev = "v0.15.0" # ← never updated, currently 18 releases behind
while all pre-commit blocks show the current version:
rev: v0.15.18 # ← correctly updated
Root cause
replace_readme_md in mirror.py matches rev: v\d+\.\d+\.\d+ (colon, no quotes) but not rev = "v\d+\.\d+\.\d+" (equals + quotes).
Fix
Add one re.sub call inside replace_readme_md:
content = re.sub(r'rev = "v\d+\.\d+\.\d+"', f'rev = "v{version}"', content)
Bug
mirror.pyupdates the pre-commit YAML-stylerev:entries inREADME.mdbut silently skips the prek TOML-stylerev =entry. After many mirror runs the prek block falls behind:while all pre-commit blocks show the current version:
Root cause
replace_readme_mdinmirror.pymatchesrev: v\d+\.\d+\.\d+(colon, no quotes) but notrev = "v\d+\.\d+\.\d+"(equals + quotes).Fix
Add one
re.subcall insidereplace_readme_md: