From 9fe915674ee7e1f91771eb5fa5a73f99bcecef88 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Wed, 25 Mar 2026 05:31:14 +0000 Subject: chore: replace all master branch references with main - executor.go: merge story branch to main before deploy - container.go: error messages reference git push origin main - api/stories.go: create story branch from origin/main (drop master fallback) - executor_test.go: test setup uses main branch Co-Authored-By: Claude Sonnet 4.6 --- internal/api/stories.go | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'internal/api') diff --git a/internal/api/stories.go b/internal/api/stories.go index 640bb0e..2f26040 100644 --- a/internal/api/stories.go +++ b/internal/api/stories.go @@ -14,20 +14,14 @@ import ( "github.com/thepeterstone/claudomator/internal/task" ) -// createStoryBranch creates a new git branch in localPath from origin/master (or main) +// createStoryBranch creates a new git branch in localPath from origin/main // and pushes it to origin. Idempotent: treats "already exists" as success. func createStoryBranch(localPath, branchName string) error { - // Fetch latest from origin so origin/master is up to date. + // Fetch latest from origin so origin/main is up to date. if out, err := exec.Command("git", "-C", localPath, "fetch", "origin").CombinedOutput(); err != nil { return fmt.Errorf("git fetch: %w (output: %s)", err, string(out)) } - // Try to create branch from origin/master; fall back to origin/main. - base := "origin/master" - if out, err := exec.Command("git", "-C", localPath, "rev-parse", "--verify", "origin/master").CombinedOutput(); err != nil { - if strings.Contains(string(out), "fatal") || err != nil { - base = "origin/main" - } - } + base := "origin/main" out, err := exec.Command("git", "-C", localPath, "checkout", "-b", branchName, base).CombinedOutput() if err != nil { if !strings.Contains(string(out), "already exists") { -- cgit v1.2.3