pre-commit-golang icon indicating copy to clipboard operation
pre-commit-golang copied to clipboard

Create more tags/releases

Open waisbrot opened this issue 5 years ago • 7 comments

I'd like to be able to pin to a specific commit without using a SHA. Conversely, the "autoupdate" feature of pre-commit by default pulls the latest tag. So for either of these use-cases, more tags would be helpful.

I believe that Github workflows would make it easy to automatically tag commits, if you'd like to make tags available without any further work from humans. (I can prepare a PR for this if it's an attractive idea)

waisbrot avatar Aug 25 '20 15:08 waisbrot

Thank you for opening this issue!

I think that automatically creating a git tag for every commit ends up making them not all that different from SHAs. It sounds like pre-commit allows you to use --bleeding-edge with autoupdate, which would be equivalent to the default behaviour if every git sha has a tag.

Why do you prefer to use a git tag over a SHA?

dnephin avatar Sep 03 '20 03:09 dnephin

Why do you prefer to use a git tag over a SHA?

  1. A friendlier name. Do I use 9690bb6a1e88f39a6073867b029aa03f0c3ba80c or is 9690b enough? I don't really want to about that corner of Git.
  2. Understand which one is newer. 9c is more recent than 43 but older than 1a

While the 'bleeding-edge' option exists, the implication is that the hook-author is creating regular releases (that are vetted) and you're choosing to use unreleased versions. Tagging every commit would communicate that every commit is considered a release, in the sense that there's no more ceremony or validation of one commit more than any other.

waisbrot avatar Sep 03 '20 12:09 waisbrot

I would also support having tags as less low-level reference

obukhov avatar Oct 07 '20 15:10 obukhov

Just bubbling this back up.

It would be great to add some tags so that pre-commit doesn't complain about pointing at a mutable reference.

We've had a lot of success by writing commits using conventional commit / angular format and then using semantic release to generate all the releases.

greenkiwi avatar Feb 18 '22 01:02 greenkiwi

I tagged https://github.com/dnephin/pre-commit-golang/releases/tag/v0.5.0 for now

dnephin avatar Feb 21 '22 19:02 dnephin

I think it's time for another tag, the last one is approaching a year old

sseneca avatar Sep 14 '22 15:09 sseneca

https://github.com/dnephin/pre-commit-golang/releases/tag/v0.5.1

dnephin avatar Oct 02 '22 19:10 dnephin

For those who may be interested: #98

dnephin avatar Nov 20 '22 20:11 dnephin