-
-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't tag nightly pre-releases #1601
Comments
Hey @varac, thanks for bringing this up! While looking at this, I also noticed that our pre-commit-hooks.yml example has an outdated Docker image version (0.14 while we're at 0.18 now). For pre-commit users, I believe the recommended approach would be to pin to specific versions in their config, like this: - id: lychee
name: lychee
description: "Run 'lychee' for fast, async, stream-based link checking"
entry: lychee
language: system
args: ["--no-progress"]
types: [text]
pass_filenames: true
require_serial: true
rev: "v0.18.0" # Pin to a specific version Or for Docker users: - id: lychee-docker
name: lychee
description: "Run 'lychee' docker image for fast, async, stream-based link checking"
entry: lycheeverse/lychee:0.18 # Updated to latest version
language: docker_image
args: ["--no-progress"]
types: [text]
pass_filenames: true
require_serial: true That said, I'm not an expert on pre-commit's best practices and might be overlooking important considerations. I'd appreciate any corrections or suggestions on how to better handle this! For now, we use the |
I'm not an expert either, but this might be a good example: https://github.com/koalaman/shellcheck-precommit/tree/master I see that
From what I have seen so far, such hooks should end with the suffix Trying to follow the current instructions I cannot get it to work.
I know, the easiest way would be to download the binary myself, but that's against how I was taught by the pre-commit FAQ and other articles to use pre-commit. As you can see from shellcheck, a popular program, providing one hook is good enough. If it works. |
That's the thing, I'd like to stick with pinned versions. But because of the nightly releases, pre-commit always updates the pinned version to $ cat .pre-commit-config.yaml
repos:
- repo: https://github.com/lycheeverse/lychee.git
rev: lychee-v0.18.0
hooks:
- id: lychee
args: ["--config", "lychee.toml"]
$ pre-commit autoupdate
[https://github.com/lycheeverse/lychee.git] updating lychee-v0.18.0 -> nightly
$ cat .pre-commit-config.yaml
repos:
- repo: https://github.com/lycheeverse/lychee.git
rev: nightly
hooks:
- id: lychee
args: ["--config", "lychee.toml"] Please note that all other pre-commit hooks I use are properly tagged, and upgrade fine to a pinned new version once there's a release. |
I'm using the lychee pre-commit hook.
pre-commit has a nifty
autoupdate
subcommand which updates all configured hooks to their latest git tags (which is considered by pre-commit as the latest stable release).In the case of lychee, it will always update to the
nightly
git tag, which is not what I want. Could be maybe not use a nightly tag please ? If it always points to the main branch HEAD it's kind of useless anyway. It it's only needed for the GitHub nightly release maybe there's another way of shipping an automated nightly release without a dedicated (moving) git tag.Thanks !
The text was updated successfully, but these errors were encountered: