Skip to content

Commit b83dbe5

Browse files
yarikopticclaude
andcommitted
CI: fix workflow syntax errors for bids-pr matrix
- Fix missing closing bracket in matrix JSON output - Fix variable name mismatch (PR_BODY_NUM vs PR_NUM) - Fix regex pattern for PR detection (escape sequences) - Fix bash conditional syntax (use || instead of 'or') 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 3f3e71e commit b83dbe5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/validate_datasets.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ jobs:
3737
run: |
3838
# Also check PR description if this is a PR
3939
if [ "${{ github.event_name }}" == "pull_request" ]; then
40-
PR_NUM=$(echo "${{ github.event.pull_request.body }}" | grep -oP 'bids-specification-pr:s*(https://github\.com/bids-standard/bids-specification/pulls/)*K[0-9]+/*' || true)
41-
[ -n "$PR_BODY_NUM" ] && echo "pr_number=$PR_NUM" >> $GITHUB_OUTPUT
40+
PR_NUM=$(echo "${{ github.event.pull_request.body }}" | grep -oP 'bids-specification-pr:\s*(https://github\.com/bids-standard/bids-specification/pulls?/)*\K[0-9]+' | head -1 || true)
41+
[ -n "$PR_NUM" ] && echo "pr_number=$PR_NUM" >> $GITHUB_OUTPUT
4242
fi
4343
4444
- name: Set matrix
@@ -48,7 +48,7 @@ jobs:
4848
if [ -n "${{ steps.find-pr.outputs.pr_number }}" ]; then
4949
EXTRA_ITEM=', "bids-pr"'
5050
fi
51-
echo 'matrix=["stable", "main", "dev", "legacy"${EXTRA_ITEM}' >> $GITHUB_OUTPUT
51+
echo "matrix=[\"stable\", \"main\", \"dev\", \"legacy\"${EXTRA_ITEM}]" >> $GITHUB_OUTPUT
5252
5353
build:
5454
needs: prepare-matrix
@@ -97,7 +97,7 @@ jobs:
9797
deno install -Agf -n bids-validator jsr:@bids/validator
9898
9999
- name: Install BIDS validator (main)
100-
if: matrix.bids-validator == 'main' or matrix.bids-validator == 'bids-pr'
100+
if: matrix.bids-validator == 'main' || matrix.bids-validator == 'bids-pr'
101101
run: |
102102
# If unmerged validator PRs are needed for testing, you can use
103103
# https://github.com/<FORK>/bids-validator/raw/<BRANCH>/bids-validator/src/bids-validator.ts

0 commit comments

Comments
 (0)