Skip to content

Commit 74e7167

Browse files
GWealecopybara-github
authored andcommitted
fix(ci): run the update-constraints hook in check mode
Co-authored-by: George Weale <gweale@google.com> PiperOrigin-RevId: 962546379
1 parent bc2c97c commit 74e7167

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.pre-commit-config.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ repos:
6666
exclude: ^scripts/
6767
- id: update-constraints
6868
name: update-constraints
69-
entry: ./scripts/update_constraints.sh
69+
# --check reuses the resolution date recorded in each constraints file.
70+
# Update mode recomputes it as "today minus 4 days" and rewrites every
71+
# header, which trips pre-commit's "files were modified by this hook".
72+
# Refresh the pins by running the script without --check.
73+
entry: ./scripts/update_constraints.sh --check
7074
language: system
7175
files: ^(pyproject\.toml|constraints-.*\.txt)$
7276
pass_filenames: false

0 commit comments

Comments
 (0)