From 0e0812f7342c5e958a1171c84192ef501dee5abc Mon Sep 17 00:00:00 2001 From: "Eshan Roy (Eshanized)" <148610067+eshanized@users.noreply.github.com> Date: Sun, 16 Jun 2024 02:08:20 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20fix(workflows):=20Changed=20the?= =?UTF-8?q?=20pattern=20to=20pattern=3D"${commit=5Femojis[$type]}=20${type?= =?UTF-8?q?}"=20to=20correctly=20construct=20the=20pattern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/commit.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/commit.yml b/.github/workflows/commit.yml index fe33c59..4e71206 100644 --- a/.github/workflows/commit.yml +++ b/.github/workflows/commit.yml @@ -27,8 +27,9 @@ jobs: echo "LATEST_COMMIT_MESSAGE: $LATEST_COMMIT_MESSAGE" for type in "${conventional_types[@]}"; do - echo "Searching for pattern: ${commit_emojis[$type]} ${type}(:|:)" - if echo "$LATEST_COMMIT_MESSAGE" | grep -qE "^${commit_emojis[$type]} ${type}(:|:)"; then + pattern="${commit_emojis[$type]} ${type}" + echo "Searching for pattern: $pattern(:|:)?" + if echo "$LATEST_COMMIT_MESSAGE" | grep -qE "^$pattern(:|:)?" ; then echo "Conventional commit message found: $LATEST_COMMIT_MESSAGE" exit 0 fi