Skip to content

Commit e7bae16

Browse files
authored
Fix label fetching (#358)
1 parent 7aa1313 commit e7bae16

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/health_base.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ jobs:
157157
- name: Fetch labels
158158
id: fetch-labels
159159
run: |
160-
labels="$(gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels.[].name')"
160+
labels=$(gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels | map(.name) | join(",")')
161161
echo "Found labels: $labels"
162162
echo "labels=$labels" >> "$GITHUB_OUTPUT"
163163
shell: bash

.github/workflows/publish.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ jobs:
140140
- name: Fetch labels
141141
id: fetch-labels
142142
run: |
143-
labels="$(gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels.[].name')"
143+
labels=$(gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels | map(.name) | join(",")')
144144
echo "Found labels: $labels"
145145
echo "labels=$labels" >> "$GITHUB_OUTPUT"
146146
shell: bash

0 commit comments

Comments
 (0)