From ffc0ba7dfd1c929f2af09fb882d829820527dab7 Mon Sep 17 00:00:00 2001 From: santiagosayshey Date: Fri, 28 Jun 2024 08:00:26 +0930 Subject: [PATCH] bugfix: Fix issue type assignment based on issue label case sensitivity --- .github/workflows/add-issue-to-project.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/add-issue-to-project.yml b/.github/workflows/add-issue-to-project.yml index 6b80dff..e8c0fed 100644 --- a/.github/workflows/add-issue-to-project.yml +++ b/.github/workflows/add-issue-to-project.yml @@ -99,8 +99,11 @@ jobs: LABEL=$(gh api repos/${{ github.repository }}/issues/${{ github.event.issue.number }} --jq '.labels[0].name') echo "Issue label: $LABEL" + # Convert label to lowercase for comparison + LABEL_LOWER=$(echo "$LABEL" | tr '[:upper:]' '[:lower:]') + # Set issue type based on label - ISSUE_TYPE_ID=$(case $LABEL in + ISSUE_TYPE_ID=$(case $LABEL_LOWER in "bug") echo "b760225f" ;; "feature request") echo "1341bde2" ;; "improvement") echo "cb34d96f" ;; @@ -130,4 +133,4 @@ jobs: } }' -f project="PVT_kwDOCjbMFM4AjuUh" -f item="${PROJECT_ITEM_ID}" -f fieldId="PVTSSF_lADOCjbMFM4AjuUhzgcCswQ" -f value="$ISSUE_TYPE_ID") echo "Set issue type result: $result" - fi + fi \ No newline at end of file