mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-07 05:56:41 +02:00
feat: multi-platform BASE_BRANCH_DETECT (GitHub + GitLab + GHE + git-native)
Update the shared BASE_BRANCH_DETECT resolver to support GitHub, GitLab, GitHub Enterprise, self-hosted GitLab, and a git-native fallback chain. Platform detection uses remote URL matching plus CLI auth status for custom domains. Add glab issue create alternative in test failure triage. Add 7 new test assertions covering GitLab CLI presence, git symbolic-ref fallback, and platform-specific output in retro and ship generated files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -333,6 +333,39 @@ describe('BASE_BRANCH_DETECT resolver', () => {
|
||||
test('resolver output uses "the base branch" phrasing', () => {
|
||||
expect(shipContent).toContain('the base branch');
|
||||
});
|
||||
|
||||
test('resolver output contains GitLab CLI commands', () => {
|
||||
expect(shipContent).toContain('glab');
|
||||
});
|
||||
|
||||
test('resolver output contains git-native fallback', () => {
|
||||
expect(shipContent).toContain('git symbolic-ref');
|
||||
});
|
||||
|
||||
test('resolver output mentions GitLab platform', () => {
|
||||
expect(shipContent).toMatch(/gitlab/i);
|
||||
});
|
||||
});
|
||||
|
||||
describe('GitLab support in generated skills', () => {
|
||||
const retroContent = fs.readFileSync(path.join(ROOT, 'retro', 'SKILL.md'), 'utf-8');
|
||||
const shipSkillContent = fs.readFileSync(path.join(ROOT, 'ship', 'SKILL.md'), 'utf-8');
|
||||
|
||||
test('retro contains GitLab MR number extraction', () => {
|
||||
expect(retroContent).toContain('[#!]');
|
||||
});
|
||||
|
||||
test('retro uses BASE_BRANCH_DETECT (contains glab)', () => {
|
||||
expect(retroContent).toContain('glab');
|
||||
});
|
||||
|
||||
test('ship contains glab mr create', () => {
|
||||
expect(shipSkillContent).toContain('glab mr create');
|
||||
});
|
||||
|
||||
test('ship checks .gitlab-ci.yml', () => {
|
||||
expect(shipSkillContent).toContain('.gitlab-ci.yml');
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user