Skip to content

Commit cc7e719

Browse files
committed
Add debug output for labels and validate category extraction in issue-to-PR workflow
1 parent 214ed8f commit cc7e719

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/issue_to_pr.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
- name: Determine category from labels
3939
id: determineCategory
4040
run: |
41+
echo "Labels: ${{ github.event.issue.labels.*.name }}"
4142
category=$(
4243
if [[ $(echo "${{ github.event.issue.labels.*.name }}" | grep -q 'examples') ]]; then
4344
echo 'examples'
@@ -49,6 +50,10 @@ jobs:
4950
echo 'library'
5051
fi
5152
)
53+
if [ -z "$category" ]; then
54+
echo "Category is empty. Please ensure the issue has a valid label."
55+
exit 1
56+
fi
5257
echo "category=$category" >> $GITHUB_OUTPUT
5358
echo "Category found: $category"
5459

0 commit comments

Comments
 (0)