File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,12 +41,11 @@ steps:
4141
4242 PR_DATA=$(cat pr_data.json)
4343
44- # Extract labels and title from PR data (Use $$ to escape bash variables)
45- PR_LABELS=$(echo "$$PR_DATA" | jq -r '[.labels[].name] | join(",")')
44+ # Extract title from PR data (Use $$ to escape bash variables)
4645 PR_TITLE=$(echo "$$PR_DATA" | jq -r '.title')
4746
48- # Check if execution labels are present
49- if [[ "$$PR_LABELS" != * "autorelease: pending"* && "$$PR_LABELS" != * "ci:run-evals"* ]] ; then
47+ # Check if execution labels are present using exact matching via jq
48+ if ! echo "$$PR_DATA" | jq -e '.labels | any(.name == "autorelease: pending" or .name == "ci:run-evals")' > /dev/null ; then
5049 echo "PR does not have 'autorelease: pending' or 'ci:run-evals' label. Skipping execution."
5150 exit 0
5251 fi
You can’t perform that action at this time.
0 commit comments