Skip to content

chore: pin pre-commit file, use dependabot#1133

Merged
henryiii merged 8 commits intopypa:mainfrom
henryiii:henryiii/ci/fullpin
Mar 27, 2026
Merged

chore: pin pre-commit file, use dependabot#1133
henryiii merged 8 commits intopypa:mainfrom
henryiii:henryiii/ci/fullpin

Conversation

@henryiii
Copy link
Contributor

@henryiii henryiii commented Mar 25, 2026

Since pre-commit already requires stationary pins, there's no update drawback to pinning. --freeze with pre-commit or prek produces this, and dependabot seems to support it.

Adding dependabot for updating these, and adding a 7 day cooldown, like our actions. I have not used dependabot for pre-commit before.

One downside is that we can't ensure that the human readable tag and the SHA match; github will not resolve tags across repos, but it can resolve SHAs across repos. So if someone other than dependabot updates these, we should ensure the SHA matches the tag. I assume mostly dependabot will be doing it, though. (We are protected from this issue for GitHub Actions by zizmor)

I wrote a script to check this for now. Started it with ChatGPT and then iterated on it a lot.

@henryiii henryiii force-pushed the henryiii/ci/fullpin branch 3 times, most recently from d312792 to 5119922 Compare March 26, 2026 04:06
@henryiii
Copy link
Contributor Author

henryiii commented Mar 26, 2026

I can simplify this, following crate-ci/typos#1528 (comment). I'm not resolving annotated tags correctly as it, but it's an easy fix. This drops the need to do the API stuff at all.

@henryiii henryiii force-pushed the henryiii/ci/fullpin branch 2 times, most recently from 8d884a3 to 5ef459b Compare March 26, 2026 20:43
henryiii and others added 8 commits March 26, 2026 21:24
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Co-authored-by: Brett Cannon <brett@python.org>
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
@henryiii henryiii force-pushed the henryiii/ci/fullpin branch from fc0b371 to dc059a5 Compare March 27, 2026 01:24
@henryiii henryiii merged commit 06892c8 into pypa:main Mar 27, 2026
56 checks passed
@henryiii henryiii deleted the henryiii/ci/fullpin branch March 27, 2026 01:48
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.

2 participants