[CI] Pin to sha all pre-commit hooks and clean up#2730
Conversation
|
@lprimak Not sure I understand how this change is meant to work, based on the description in the PR. |
Hey @steinarb we are running prek-action which runs our Git hook framework: https://github.com/apache/shiro/blob/main/.github/workflows/pre-commit.yml https://github.com/apache/shiro/blob/main/.github/workflows/pre-commit-manual.yml We have both standard and manual hooks. Originally we were running pre-commit but have moved to prek. See below from Google but check the official site for more ways to install prek and use it locally. So prek is meant to run on developer machines before pushing up to GitHub. You should also checkout the homepage of the original pre-commit site for info on why git hook scripts are useful: Perhaps I should explain more in another PR with some of this information for the contributing guide ? Overview: Transitioning to
|
f9e2d8d to
5352e0f
Compare
Tested with:
pre-commit run --all-fileshttps://docs.github.com/en/code-security/reference/supply-chain-security/supported-ecosystems-and-repositories#pre-commit
You can use a
# frozen:comment after therevvalue to pin a hook to a particular version or version prefix. Dependabot uses this comment to determine whether an update is needed and which tag to resolve.Example on Apache Airflow:
https://github.com/apache/airflow/blob/fd9241cdf0bb64d5b3c4619be83619db62671824/.pre-commit-config.yaml#L301
Lucas-C/pre-commit-hooks@ad1b27d
codespell-project/codespell@2ccb47f
pre-commit/pre-commit-hooks@3e8a870
igorshubovych/markdownlint-cli@e72a3ca
adrienverge/yamllint@cba56bc
gitleaks/gitleaks@83d9cd6
zizmorcore/zizmor-pre-commit@9257c60
rhysd/actionlint@914e7df
tcort/markdown-link-check@3a8992d
oxipng/oxipng@628e241
python-jsonschema/check-jsonschema@f805888
shellcheck-py/shellcheck-py@745efac
editorconfig-checker/editorconfig-checker.python@bebfac8