Skip to content

Commit be65ea0

Browse files
authored
Merge pull request #1915 from walt-id/fix/mobile-eligibility-label-detection
fix(ci): restore mobile eligibility label detection
2 parents 9cd24fa + 339f469 commit be65ea0

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

.github/workflows/mobile-eligibility.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,18 @@ jobs:
120120
exit 0
121121
fi
122122
123-
if jq -e --arg label "$PLATFORM_LABEL" 'index($label) != null or index("ci:mobile") != null' <<< "$PR_LABELS" >/dev/null; then
124-
if jq -e --arg label "$PLATFORM_LABEL" 'index($label) != null' <<< "$PR_LABELS" >/dev/null; then
125-
set_decision true "$PLATFORM_LABEL label"
126-
else
127-
set_decision true "ci:mobile label"
128-
fi
129-
exit 0
130-
fi
123+
label_match="$(
124+
jq -er --arg platform_label "$PLATFORM_LABEL" '
125+
if index($platform_label) != null then "platform"
126+
elif index("ci:mobile") != null then "mobile"
127+
else "none"
128+
end
129+
' <<< "$PR_LABELS"
130+
)"
131+
case "$label_match" in
132+
platform) set_decision true "$PLATFORM_LABEL label"; exit 0 ;;
133+
mobile) set_decision true "ci:mobile label"; exit 0 ;;
134+
esac
131135
132136
if [[ "$PR_DRAFT" == "true" ]]; then
133137
set_decision false "draft PR without $PLATFORM_LABEL or ci:mobile label"

0 commit comments

Comments
 (0)