Repository navigation
feat(ci): add central run-bids-validation + run-pr-merge workflows - #12
Merged
neuromechanist merged 2 commits intoMay 23, 2026
Merged
neuromechanist merged 2 commits into
neuromechanist merged 2 commits into
Conversation
Closes #11. Phase 4 of nemarOrg/nemar-cli#601. Two central workflows that pair with thin per-repo shims (nemar-cli#611) — PR-event-triggered workflows can't be relocated directly because GitHub PR events fire only in the repo where the PR lives, so the shim fires repository_dispatch here. The bids-validation workflow uses the GitHub Checks API to post results back to the dataset repo's PR; the pr-merge workflow cuts the tag + release directly on the dataset repo.
3 of 5 tasks
…otency Code-review findings: 1) Validator version was hardcoded 2.0.0 in run-bids-validation.yml with no runtime sync to the CLI's validator-version.json pin (currently 2.4.1). Add validator_version as a workflow_dispatch input + client_payload field. The shim in nemarOrg/nemar-cli#611 interpolates the CLI's VALIDATOR_VERSION at template-deploy time so the value tracks the pin across ci/sync runs. The workflow_dispatch default (2.4.1) tracks the current pin; manual dispatches without an input get the default. 2) The tag-and-release step was a single atomic write — a network blip after git push but before gh release create would leave a tag without a release, and the Phase 2 tag-push handler would mint a DOI against a release-less tag. Split into 'Create tag if missing' + 'Create release if missing' (gh release view || gh release create) so a rerun after a partial failure creates the missing release.
neuromechanist
deleted the
11-add-central-run-bids-validation-+-run-pr-merge-workflows
branch
May 23, 2026 16:30
This was referenced May 23, 2026
neuromechanist
added a commit
to nemarOrg/nemar-cli
that referenced
this pull request
May 23, 2026
Closes #610. Phase 4 of epic #601. The PR-triggered workflows can't be relocated directly because GitHub's pull_request / pull_request_target events fire only in the repo where the PR lives. Phase 4 takes a hybrid approach: - bids-validation.yml is now a ~30-line shim: triggers on push to main + pull_request to main, mints an App token scoped to .github, dispatches repository_dispatch[run-bids-validation] at nemarDatasets/.github with dataset_id/ref/head_sha/pr_number in the payload. The central run-bids-validation.yml (nemarDatasets/.github#12) does the deno validator work and posts the result back as a GitHub check-run on the dataset repo so the PR reviewer still sees a check. - pr-merge.yml's create-release job is now a ~25-line shim: dispatches repository_dispatch[run-pr-merge] at .github. The central run-pr-merge.yml creates the tag + GitHub release on the dataset repo. The cleanup-staging job stays inline because it's AWS-only with no GitHub coupling and centralizing it would just add a network hop. - version-check.yml stays per-repo unchanged. ~50 lines of pure JSON math, low churn, shimming saves nothing. Documented as the per-repo endstate. test/workflow-yaml.test.ts updated: 'migrated templates' assertions pin the new shim contract (App token scoped to .github, dispatch to repos/nemarDatasets/.github/dispatches with the right event_type). A new test pins the dispatch contract directly. The validator-pin assertion drops the per-template substring check (the shim no longer carries the validator string); the CLI runtime pin file stays the source of truth. Read-only templates list shrinks to just version-check.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #11. Phase 4 of nemarOrg/nemar-cli#601.
What
Two new central workflows that pair with thin per-repo shims (nemarOrg/nemar-cli#611). PR-event-triggered workflows can't be relocated directly because GitHub PR events fire only in the repo where the PR lives, so the dataset repo's shim fires
repository_dispatchhere.run-bids-validation.ymlrepository_dispatch[run-bids-validation]+workflow_dispatch.dataset_id,ref,head_sha,pr_number(optional).status=in_progressso the PR reviewer sees a pending check immediately.head_sha, runs deno BIDS validator with the same jq pipeline + annex-pointer filtering as the legacy per-repo template.conclusion=success/failureand a human-readable summary linking back to the central run logs.run-pr-merge.ymlrepository_dispatch[run-pr-merge](the shim fires this when a PR closes withmerged==true).dataset_description.json, creates thevX.Y.Ztag + GitHub release. The tag push then fires the Phase 2 tag-push handler which dispatches version-doi.cleanup-stagingjob stays inline on the dataset-repo shim because it's AWS-only with no GitHub coupling.permissions: {}on both jobs; all GitHub writes go through the per-repo App token.Test plan
After merge:
Expect green; the bids-validation run creates a check-run on
nemarDatasets/nm099999@<sha>visible in thegh api .../check-runslisting.