Skip to content

Add BIDS CI at upload, push --pr, dataset ci command - #74

Merged
neuromechanist merged 2 commits into
devfrom
feature/bids-ci-upload
Jan 24, 2026
Merged

neuromechanist merged 2 commits into
devfrom
feature/bids-ci-upload

Conversation

@neuromechanist

@neuromechanist neuromechanist commented Jan 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes #51

  • Auto-deploy BIDS validation CI workflow after dataset upload finalization
  • Add --pr, --title, --body flags to nemar dataset push for creating pull requests
  • Add nemar dataset ci [dataset-id] command to check CI status (auto-detects ID from git remote)
  • Add user-accessible GET /datasets/:id/ci/status backend endpoint
  • Fix pre-existing TypeScript error in admin.ts (closure narrowing)

Changes

File Change
src/commands/dataset.ts CI deployment in upload, --pr in push, ci command
src/lib/git-annex.ts getDatasetIdFromRemote() helper
src/lib/api.ts getUserCiStatus() API function
backend/src/routes/datasets.ts User CI status endpoint
backend/src/routes/admin.ts Fix requestId TypeScript error
test/bids-ci.test.ts 9 tests covering all new functionality

Test plan

  • All 182 tests pass (bun test)
  • Biome lint/format clean
  • TypeScript type check clean
  • PR review with /review-pr
  • E2E test with nm099999 (clone, get, save, push, drop cycle)

- Auto-deploy BIDS validation workflow after upload finalization
- Add --pr/--title/--body flags to dataset push for PR creation
- Add dataset ci command to check CI status (auto-detects ID)
- Add user-accessible GET /datasets/:id/ci/status endpoint
- Fix pre-existing TypeScript error in admin.ts
@github-actions

github-actions Bot commented Jan 24, 2026 •

Copy link
Copy Markdown

📦 Package Preview

Your package is ready to test!

bun install -g nemar-cli@PR74

Version: 0.3.7-PR74.977d777
Commit: 977d777


🤖 Updated on each push.

- Fix SQL query: JOIN users table for owner_username
- Add auth flag to getUserCiStatus API call
- Add try-catch around gh spawn in push --pr
- Differentiate 403 from other errors in CI deployment
- Fix null branch treated as "on main" in PR creation
- Remove duplicate error message in dataset ci
- Add server-side logging for GitHub API errors
@neuromechanist

Copy link
Copy Markdown
Contributor Author

PR Review Summary

Critical Issues Fixed (commit 977d777)

  1. SQL query bug (datasets.ts) - owner_username doesn't exist in datasets table; fixed with JOIN to users table
  2. Missing auth flag (api.ts) - getUserCiStatus would fail with 401; added auth parameter
  3. No try-catch around spawn (dataset.ts) - gh not installed would crash with raw stack trace; added error handling with helpful message
  4. Bare catch hides errors (dataset.ts) - CI deployment now shows error reason and differentiates 403 (expected for non-admin) from real failures
  5. Null branch = "on main" (dataset.ts) - getCurrentBranch returning null now errors instead of silently skipping PR
  6. Duplicate error message (dataset.ts) - Removed redundant console.log in ApiError catch
  7. No server-side logging (datasets.ts) - Added console.error for GitHub API failures

All issues addressed. Tests, lint, and typecheck pass.

This branch was previously deployed

1 inactive deployment
npm — 977d7771 Deployed Jan 24, 2026 by neuromechanist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant