From 1cc1fa3bd63aa5ceb0dc5cf8049c367e2e3c8eeb Mon Sep 17 00:00:00 2001 From: "Eshan Roy (Eshanized)" <148610067+eshanized@users.noreply.github.com> Date: Sun, 16 Jun 2024 01:51:47 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20fix(workflows):=20debug=20for=20?= =?UTF-8?q?continued=20issue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/commit.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/commit.yml b/.github/workflows/commit.yml index d9c738b..f01ed73 100644 --- a/.github/workflows/commit.yml +++ b/.github/workflows/commit.yml @@ -24,7 +24,13 @@ jobs: conventional_types=("build" "chore" "ci" "docs" "feat" "fix" "perf" "refactor" "revert" "style" "test") commit_emojis=("build"="๐Ÿ—๏ธ" "chore"="๐Ÿงน" "ci"="๐Ÿค–" "docs"="๐Ÿ“š" "feat"="๐ŸŽ‰" "fix"="๐Ÿ”ง" "perf"="โšก๏ธ" "refactor"="๐Ÿ’ก" "revert"="๐Ÿšจ" "style"="๐Ÿ’„" "test"="๐Ÿงช") + echo "LATEST_COMMIT_MESSAGE: $LATEST_COMMIT_MESSAGE" + for type in "${conventional_types[@]}"; do + pattern="^${commit_emojis[$type]} ${type}(:|:)" + + echo "Searching for pattern: $pattern" + if echo "$LATEST_COMMIT_MESSAGE" | awk -v emoji="${commit_emojis[$type]}" -v type="$type" ' BEGIN { pattern = "^" emoji " " type "(:|:)" } /pattern/ { print "Conventional commit message found: " $0; exit 0 }