Skip to content

Commit 34879e8

Browse files
committed
Replace get-labels-action with github.event.issue.labels
1 parent e5ab77b commit 34879e8

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

.github/workflows/issue_to_pr.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,16 @@ jobs:
3535
- name: Install dependencies
3636
run: pip install -r requirements.txt
3737

38-
- name: Get issue labels
39-
id: getLabels
40-
uses: snnaplab/get-labels-action@v1
41-
with:
42-
number: ${{ github.event.issue.number }}
43-
4438
- name: Determine category from labels
4539
id: determineCategory
4640
run: |
47-
labels_json="${{ steps.getLabels.outputs.labels }}"
41+
labels_json="${{ toJson(github.event.issue.labels) }}"
4842
echo "Labels: $labels_json"
4943
category=$(python scripts/determine_category.py "$labels_json")
44+
if [ -z "$category" ]; then
45+
echo "Category is empty. Please ensure the issue has a valid label."
46+
exit 1
47+
fi
5048
echo "category=$category" >> $GITHUB_OUTPUT
5149
echo "Category found: $category"
5250

0 commit comments

Comments
 (0)