From 63e472d645ed3b1c0195132bb415286ad27cfa39 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Wed, 8 Jan 2025 16:27:02 +0100 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=A7=AA=20Disable=20`no-commit-to-bran?= =?UTF-8?q?ch`=20@=20GHA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This turns off the "is push to master" in GitHub Actions CI/CD as it does not make sense in this environment, being local-only [[1]]. [1]: https://github.com/pre-commit/pre-commit-hooks/issues/1124 --- .github/workflows/ci-cd.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index f5c0ca61d..0e18ee217 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -387,8 +387,14 @@ jobs: - pre-commit - metadata-validation environment-variables: + # `no-commit-to-branch` is skipped because it does not make sense + # in the CI, only locally. + # Ref: https://github.com/pre-commit/pre-commit-hooks/issues/1124 - >- # only affects pre-commit, set for all for simplicity: - SKIP=hadolint,shfmt + SKIP= + hadolint, + no-commit-to-branch, + shfmt, tox-run-posargs: - '' xfail: From 9c58ad5135e707ef5aad3e1ecf9dcf8e22245f37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9F=87=BA=F0=9F=87=A6=20Sviatoslav=20Sydorenko=20=28?= =?UTF-8?q?=D0=A1=D0=B2=D1=8F=D1=82=D0=BE=D1=81=D0=BB=D0=B0=D0=B2=20=D0=A1?= =?UTF-8?q?=D0=B8=D0=B4=D0=BE=D1=80=D0=B5=D0=BD=D0=BA=D0=BE=29?= Date: Wed, 8 Jan 2025 19:12:01 +0100 Subject: [PATCH 2/3] Indent check names in pre-commit SKIP env var This might work, but there's a change it would be parsed weirdly. Though, it shouldn't be a factor in the way how pre-commit processes it. Co-authored-by: Maksym Vlasov --- .github/workflows/ci-cd.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 0e18ee217..20852a174 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -392,9 +392,9 @@ jobs: # Ref: https://github.com/pre-commit/pre-commit-hooks/issues/1124 - >- # only affects pre-commit, set for all for simplicity: SKIP= - hadolint, - no-commit-to-branch, - shfmt, + hadolint, + no-commit-to-branch, + shfmt, tox-run-posargs: - '' xfail: From b407c51228fd93141a09dfcf7d2292d894abc61d Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Wed, 8 Jan 2025 19:15:49 +0100 Subject: [PATCH 3/3] Revert "Indent check names in pre-commit SKIP env var " This reverts commit 9c58ad5135e707ef5aad3e1ecf9dcf8e22245f37. --- .github/workflows/ci-cd.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 20852a174..0e18ee217 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -392,9 +392,9 @@ jobs: # Ref: https://github.com/pre-commit/pre-commit-hooks/issues/1124 - >- # only affects pre-commit, set for all for simplicity: SKIP= - hadolint, - no-commit-to-branch, - shfmt, + hadolint, + no-commit-to-branch, + shfmt, tox-run-posargs: - '' xfail: