Coder Social home page Coder Social logo

Comments (8)

maxbrunet avatar maxbrunet commented on June 16, 2024 3

Hello! 👋

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

from alejandra.

arichtman avatar arichtman commented on June 16, 2024 1

@kamadorueda Can we apply the tags to main ?

from alejandra.

kamadorueda avatar kamadorueda commented on June 16, 2024 1

@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!

from alejandra.

arichtman avatar arichtman commented on June 16, 2024

So it looks like pre-commit isn't seeing the tags. The only difference I can see is that 1.3.0 is unverified?

https://github.com/pre-commit/pre-commit/blob/bb49560dc99a65608c8f9161dd71467af163c0d1/pre_commit/commands/autoupdate.py#L42

[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

from alejandra.

arichtman avatar arichtman commented on June 16, 2024

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

from alejandra.

kamadorueda avatar kamadorueda commented on June 16, 2024

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

from alejandra.

arichtman avatar arichtman commented on June 16, 2024

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
image

There's nothing obviously different here either
image

😵

from alejandra.

arichtman avatar arichtman commented on June 16, 2024

Confirming this works now with v3.0.0.

from alejandra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.