Skip to content

Commit 0cff20f

Browse files
authored
Merge pull request #40 from SableRaf/main
Fix workflow for ingesting issues based on labels
2 parents 34879e8 + 2db17a0 commit 0cff20f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/issue_to_pr.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,19 @@ jobs:
3535
- name: Install dependencies
3636
run: pip install -r requirements.txt
3737

38+
- name: Get issue labels
39+
id: getLabels
40+
env:
41+
GH_TOKEN: ${{ github.token }}
42+
run: |
43+
labels=$(gh issue view "${{ github.event.issue.number }}" --json labels -q '.labels|map(.name)')
44+
echo "Labels: $labels"
45+
echo "labels=$labels" >> $GITHUB_ENV
46+
3847
- name: Determine category from labels
3948
id: determineCategory
4049
run: |
41-
labels_json="${{ toJson(github.event.issue.labels) }}"
50+
labels_json='${{ env.labels }}'
4251
echo "Labels: $labels_json"
4352
category=$(python scripts/determine_category.py "$labels_json")
4453
if [ -z "$category" ]; then

0 commit comments

Comments
 (0)