Skip to content

Commit 056a865

Browse files
authored
ci: Fix issue labelling with multiple labels (#16072)
Oops, the change I made seems to not work (https://github.com/getsentry/sentry-javascript/actions/runs/14487310833/job/40635465597#step:3:159). This should hopefully fix this by splitting this into two steps.
1 parent 8682df0 commit 056a865

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

.github/workflows/issue-package-label.yml

+28-2
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ jobs:
120120
"label": "WASM"
121121
},
122122
"Sentry.Browser.Loader": {
123-
"label": "Browser\nLoader Script"
123+
"label": "Browser"
124124
},
125125
"Sentry.Browser.CDN.bundle": {
126-
"label": "Browser\nCDN Bundle"
126+
"label": "Browser"
127127
}
128128
}
129129
export_to: output
@@ -134,3 +134,29 @@ jobs:
134134
uses: actions-ecosystem/action-add-labels@v1
135135
with:
136136
labels: ${{ steps.packageLabel.outputs.label }}
137+
138+
- name: Map additional to issue label
139+
# https://github.com/kanga333/variable-mapper
140+
uses: kanga333/variable-mapper@v0.3.0
141+
id: additionalLabel
142+
if: steps.packageName.outputs.match != ''
143+
with:
144+
key: '${{ steps.packageName.outputs.group1 }}'
145+
# Note: Since this is handled as a regex, and JSON parse wrangles slashes /, we just use `.` instead
146+
map: |
147+
{
148+
"Sentry.Browser.Loader": {
149+
"label": "Browser"
150+
},
151+
"Sentry.Browser.CDN.bundle": {
152+
"label": "CDN Bundle"
153+
}
154+
}
155+
export_to: output
156+
157+
- name: Add additional label if applicable
158+
# Note: We only add the label if the issue is still open
159+
if: steps.additionalLabel.outputs.label != ''
160+
uses: actions-ecosystem/action-add-labels@v1
161+
with:
162+
labels: ${{ steps.packageLabel.outputs.label }}

0 commit comments

Comments
 (0)