Compare commits

...

5 Commits

Author SHA1 Message Date
Jérôme Revillard 19a4c88792
Merge 31d6c8357f into c48b6f3069 2026-05-12 21:10:14 -04:00
Brian c48b6f3069
Merge pull request #2345 from bma-d/bma-d/add-automator
feat(installer): add BMad Automator module
2026-05-12 20:04:29 -05:00
Brian fd0018900e
Merge branch 'main' into bma-d/add-automator 2026-05-12 20:04:16 -05:00
bmad a3e0545847
feat(installer): register automator module 2026-05-08 18:10:22 -03:00
Jerome Revillard 31d6c8357f fix: resolve default branch explicitly when updating shallow-cloned custom modules
With shallow clones (--depth 1), `origin/HEAD` becomes stale after the
initial clone. The update path used `git reset --hard origin/HEAD` which
never picked up new commits pushed to the default branch.

Resolve the default branch name via `git symbolic-ref refs/remotes/origin/HEAD`,
then fetch and reset against `origin/<branch>` explicitly. Falls back to
`main` if origin/HEAD is not set.
2026-05-04 09:52:20 +02:00
2 changed files with 32 additions and 1 deletions

View File

@ -424,7 +424,27 @@ class CustomModuleManager {
stdio: ['ignore', 'pipe', 'pipe'],
});
} else {
execSync('git reset --hard origin/HEAD', {
// Resolve the default branch (origin/HEAD) and fetch it explicitly.
// With shallow clones, `origin/HEAD` is stale and `git reset --hard
// origin/HEAD` never picks up new commits on the default branch.
let defaultBranch = 'main';
try {
defaultBranch = execSync('git symbolic-ref refs/remotes/origin/HEAD --short', {
cwd: repoCacheDir,
stdio: 'pipe',
})
.toString()
.trim()
.replace('origin/', '');
} catch {
// Fallback if origin/HEAD is not set
}
execSync(`git fetch --depth 1 origin ${quoteCustomRef(defaultBranch)}`, {
cwd: repoCacheDir,
stdio: ['ignore', 'pipe', 'pipe'],
env: { ...process.env, GIT_TERMINAL_PROMPT: '0' },
});
execSync(`git reset --hard origin/${quoteCustomRef(defaultBranch)}`, {
cwd: repoCacheDir,
stdio: ['ignore', 'pipe', 'pipe'],
});

View File

@ -18,6 +18,17 @@ modules:
npmPackage: bmad-builder
default_channel: stable
bmad-automator:
url: https://github.com/bmad-code-org/bmad-automator
module-definition: skills/module.yaml
code: baut
name: "BMad Automator"
description: "Story automation skills"
defaultSelected: false
type: experimental
npmPackage: bmad-story-automator
default_channel: next
bmad-creative-intelligence-suite:
url: https://github.com/bmad-code-org/bmad-module-creative-intelligence-suite
module-definition: src/module.yaml