Skip to content

Add pyproject and hook to auto download github releases#1152

Open
IamTheFij wants to merge 2 commits intohadolint:masterfrom
IamTheFij:binary-install-precommit
Open

Add pyproject and hook to auto download github releases#1152
IamTheFij wants to merge 2 commits intohadolint:masterfrom
IamTheFij:binary-install-precommit

Conversation

@IamTheFij
Copy link
Copy Markdown

@IamTheFij IamTheFij commented Dec 11, 2025

Fixes #886

What I did

I've added a pyproject.toml and a new hook that will allow pre-commit to install hadolint binaries using pip. I've done something similar for StyLua.

How I did it

I had to make an update to release-gitter to add version parsing from *.cabal files, but with that

How to verify it

I added a test to release-gitter that runs off my fork that validate this.

I also tested by adding the following to a repo of mine with pre-commit:

  - repo: https://github.com/hadolint/hadolint
    rev: refs/pull/1152/head
    hooks:
      - id: hadolint-github

It successfully downloaded and ran the checks.

This will force any forks to continue to download releases from upstream unless they change the URL
@IamTheFij IamTheFij force-pushed the binary-install-precommit branch from 0671e11 to 143ea06 Compare December 11, 2025 18:58
@IamTheFij
Copy link
Copy Markdown
Author

Actually, it looks like I forgot to tell release_gitter to pull the git URL from the remote when using the builder. I've got a new push to add that capability, but we could also leave the URL hard coded here. Either way will work.

@IamTheFij IamTheFij closed this Dec 11, 2025
@IamTheFij IamTheFij reopened this Dec 11, 2025
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.

pre-commit install-hooks not installing hadolint binary

1 participant