bugfix: Fix issue type assignment based on issue label case sensitivity

This commit is contained in:
santiagosayshey
2024-06-28 08:00:26 +09:30
parent a15aa44d70
commit ffc0ba7dfd

View File

@@ -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