From b6a2b0a28cdb387f5d736a420bc2d9b066526e9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Mikul=C3=A1=C5=A1ek?= Date: Tue, 19 Nov 2024 11:08:30 +0100 Subject: [PATCH 1/2] fix(commit-lint): recognize also Update as renovate commit --- .github/workflows/commit-lint-shell.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/commit-lint-shell.yaml b/.github/workflows/commit-lint-shell.yaml index c57f4ed..b0faa66 100644 --- a/.github/workflows/commit-lint-shell.yaml +++ b/.github/workflows/commit-lint-shell.yaml @@ -60,7 +60,7 @@ jobs: REPO_NAME="${{ github.repository }}" if [[ "$REPO_NAME" =~ ^(.*/)?(gdc-nas|gdc-ui|gooddata-ui-sdk|gdc-panther)$ ]]; then - if [[ ! "$COMMIT_SUBJECT" =~ ^chore.*:[[:space:]]update ]]; then + if [[ ! "$COMMIT_SUBJECT" =~ ^chore.*:[[:space:]][Uu]pdate ]]; then TRAILERS=$(git show -s --format=%B "$COMMIT_HASH" | git interpret-trailers --parse) if ! echo "$TRAILERS" | grep -iqE '^risk:\s*(nonprod|low|high)'; then COMMIT_VIOLATIONS+=":x: does not contain a valid risk trailer\n" From d0b559a7a2e668dfd1eb4b68484685bb4a4ef536 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Mikul=C3=A1=C5=A1ek?= Date: Thu, 28 Nov 2024 15:44:47 +0100 Subject: [PATCH 2/2] fix(commit-lint): do not check revert commits --- .github/workflows/commit-lint-shell.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/commit-lint-shell.yaml b/.github/workflows/commit-lint-shell.yaml index b0faa66..235ba32 100644 --- a/.github/workflows/commit-lint-shell.yaml +++ b/.github/workflows/commit-lint-shell.yaml @@ -49,7 +49,11 @@ jobs: COMMIT_HASH=$(echo "$COMMIT" | awk '{print $1}') COMMIT_SUBJECT=$(echo "$COMMIT" | cut -d' ' -f2-) COMMIT_VIOLATIONS="" - + + if [[ "$COMMIT_SUBJECT" =~ ^revert ]]; then + continue + fi + if ! [[ "$COMMIT_SUBJECT" =~ $CONVENTIONAL_REGEX ]]; then COMMIT_VIOLATIONS+=":x: does not follow Conventional Commits guidelines\n" fi