Closed arichtman closed 10 months ago
So it looks like pre-commit isn't seeing the tags. The only difference I can see is that 1.3.0 is unverified?
[nixos@bruce-banner:~/repos/alejandra]$ git describe --tags --abbrev=0
1.3.0
[nixos@bruce-banner:~/repos/alejandra]$ git tag -l
0.0.0
0.1.0
0.2.0
0.3.0
0.3.1
0.4.0
0.5.0
0.6.0
0.7.0
1.0.0
1.1.0
1.2.0
1.3.0
1.4.0
1.5.0
2.0.0
3.0.0
Yup, confirmed. I forked it, added a signed tag for v3.0.1
and pointed my .pre-commit-config.yaml
to it and ran pre-commit autoupdate
and it picked it up. Unfortunately there's no way I can send a pull request to sign these tags.
https://github.com/arichtman/alejandra/releases/tag/v3.0.1
- repo: https://github.com/arichtman/alejandra
rev: v3.0.0
hooks:
- id: alejandra-nix
I don't understand what the solution would be
3.0.0 is signed (according to this https://github.com/kamadorueda/alejandra/tags)
is signed vs unsigned the problem? should I sign 1.3.0?
another difference I see with your fork is that you are using v3.x.x
instead of 3.x.x
happy to help adjust the tags once we confirm what the solution is
Ah yes, you're right it's not the signing/verification. I pushed an unsigned tag of 3.0.1
to my fork and that updated the hook alejandra
correctly.
I thought maybe they were different types of tags but they're all commits
There's nothing obviously different here either
😵
Hello! :wave:
Tags must be on the default branch (main
) for pre-commit autoupdate
to work properly:
By default, this will bring the hooks to the latest tag on the default branch.
https://pre-commit.com/#updating-hooks-automatically
1.3.0
is the latest tag on main
:
$ git tag --merged main
0.0.0
0.1.0
0.2.0
0.3.0
0.4.0
1.3.0
@kamadorueda Can we apply the tags to main ?
@maxbrunet thanks! I understand the problem now. The commit some tags point to is not a commit in main
The fix was making sure that 3.0.0 points to a commit in main: git tag 3.0.0 e7eac49074b70814b542fee987af2987dd0520b5 -f
Now 3.0.0 appears in main
$ git tag --merged origin/main
0.0.0
0.1.0
0.2.0
0.3.0
0.4.0
1.3.0
3.0.0
Thanks!
Confirming this works now with v3.0.0
.
Hi everyone - love the project and would like to contribute if anyone has any ideas on where this might be coming from. The git tags all seem to be chronologically correct too.
Action: autoupdate a pre-commit hook using Alejandra Expected: Version 3.0.0 is selected Actual: 1.3.0 is selected
Files to reproduce are here.
https://gist.github.com/arichtman/5836c61721cc9d1fabae428e970bfbbc