summaryrefslogtreecommitdiff
path: root/internal/api
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-03-25 05:31:14 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-03-25 05:31:14 +0000
commit9fe915674ee7e1f91771eb5fa5a73f99bcecef88 (patch)
tree9d73f93639cda1404da008ce8d0290d98f9cb000 /internal/api
parent436862484e53e9cf06b2594bcefd99621e603a72 (diff)
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 <noreply@anthropic.com>
Diffstat (limited to 'internal/api')
-rw-r--r--internal/api/stories.go12
1 files changed, 3 insertions, 9 deletions
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") {