Repository navigation
Add defensive check for main branch naming - #195
Merged
neuromechanist merged 3 commits intoFeb 25, 2026
Merged
neuromechanist merged 3 commits into
neuromechanist merged 3 commits into
Conversation
Dataset repos created with DataLad use adjusted/master(unlocked) as default branch, breaking CI, branch protection, and metadata pipelines that hardcode "main". Add ensureLocalMainBranch() for CLI upload flow (prompts user to rename) and ensureMainBranch() for backend finalize/webhook routes (auto-renames via API). Closes #194
bun test shares module cache with spawned subprocesses, making NEMAR_CONFIG_DIR unreliable for isolating the Conf instance. Use TEST_API_URL env var which is checked at call time instead.
- Refactor ensureLocalMainBranch: extract promptForRename helper, handle null branch with warning, capture git stderr, log errors with manual rename hint - Add response body to github.ts repo-fetch error message - Add datasetId to finalize branch-check log message - Update docs to mention CLI auto-detection of branch name
neuromechanist
deleted the
194-add-defensive-check-ensure-dataset-repos-use-main-branch
branch
February 25, 2026 13:26
This was referenced Feb 25, 2026
Merged
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.
Summary
ensureLocalMainBranch()to CLI upload flow: checks local branch name before push, prompts user to rename if notmainensureMainBranch()to backend: checks remote default branch via GitHub API, auto-renames in finalize and llm-enrich webhookmainContext
Dataset repos created with DataLad use
adjusted/master(unlocked)as default branch. The backend hardcodesmaineverywhere (branch protection, CI workflows, file reads, webhooks), so these repos silently fail on CI, protection, and metadata operations.Test plan
mainas default branchCloses #194