summaryrefslogtreecommitdiff
path: root/internal/executor
diff options
context:
space:
mode:
Diffstat (limited to 'internal/executor')
-rw-r--r--internal/executor/container.go4
-rw-r--r--internal/executor/executor.go8
-rw-r--r--internal/executor/executor_test.go12
3 files changed, 12 insertions, 12 deletions
diff --git a/internal/executor/container.go b/internal/executor/container.go
index 8b244c6..95717b4 100644
--- a/internal/executor/container.go
+++ b/internal/executor/container.go
@@ -473,7 +473,7 @@ func detectUncommittedChanges(workspace string) error {
if err == nil {
for _, line := range strings.Split(strings.TrimSpace(string(diffOut)), "\n") {
if line != "" && !isScaffold(line) {
- return fmt.Errorf("agent left uncommitted changes (work would be lost on sandbox deletion):\n%s\nInstructions must include: git add -A && git commit && git push origin master", strings.TrimSpace(string(diffOut)))
+ return fmt.Errorf("agent left uncommitted changes (work would be lost on sandbox deletion):\n%s\nInstructions must include: git add -A && git commit && git push origin main", strings.TrimSpace(string(diffOut)))
}
}
}
@@ -489,7 +489,7 @@ func detectUncommittedChanges(workspace string) error {
}
}
if len(dirty) > 0 {
- return fmt.Errorf("agent left untracked files not committed (work would be lost on sandbox deletion):\n%s\nInstructions must include: git add -A && git commit && git push origin master", strings.Join(dirty, "\n"))
+ return fmt.Errorf("agent left untracked files not committed (work would be lost on sandbox deletion):\n%s\nInstructions must include: git add -A && git commit && git push origin main", strings.Join(dirty, "\n"))
}
}
diff --git a/internal/executor/executor.go b/internal/executor/executor.go
index 7213b34..9052bd7 100644
--- a/internal/executor/executor.go
+++ b/internal/executor/executor.go
@@ -512,13 +512,13 @@ func (p *Pool) triggerStoryDeploy(ctx context.Context, storyID string) {
if proj.DeployScript == "" {
return
}
- // Merge story branch to master before deploying (ADR-007).
+ // Merge story branch to main before deploying (ADR-007).
if story.BranchName != "" && proj.LocalPath != "" {
mergeSteps := [][]string{
{"git", "-C", proj.LocalPath, "fetch", "origin"},
- {"git", "-C", proj.LocalPath, "checkout", "master"},
+ {"git", "-C", proj.LocalPath, "checkout", "main"},
{"git", "-C", proj.LocalPath, "merge", "--no-ff", story.BranchName, "-m", "Merge " + story.BranchName},
- {"git", "-C", proj.LocalPath, "push", "origin", "master"},
+ {"git", "-C", proj.LocalPath, "push", "origin", "main"},
}
for _, args := range mergeSteps {
if mergeOut, mergeErr := exec.CommandContext(ctx, args[0], args[1:]...).CombinedOutput(); mergeErr != nil {
@@ -526,7 +526,7 @@ func (p *Pool) triggerStoryDeploy(ctx context.Context, storyID string) {
return
}
}
- p.logger.Info("story branch merged to master", "storyID", storyID, "branch", story.BranchName)
+ p.logger.Info("story branch merged to main", "storyID", storyID, "branch", story.BranchName)
}
out, err := exec.CommandContext(ctx, proj.DeployScript).CombinedOutput()
if err != nil {
diff --git a/internal/executor/executor_test.go b/internal/executor/executor_test.go
index c68d37b..a8fd9da 100644
--- a/internal/executor/executor_test.go
+++ b/internal/executor/executor_test.go
@@ -1832,12 +1832,12 @@ func TestPool_StoryDeploy_MergesStoryBranch(t *testing.T) {
runGit(t, localDir, "config", "user.email", "test@test.com")
runGit(t, localDir, "config", "user.name", "Test")
- // Initial commit on master.
- runGit(t, localDir, "checkout", "-b", "master")
+ // Initial commit on main.
+ runGit(t, localDir, "checkout", "-b", "main")
os.WriteFile(filepath.Join(localDir, "README.md"), []byte("initial"), 0644)
runGit(t, localDir, "add", ".")
runGit(t, localDir, "commit", "-m", "initial")
- runGit(t, localDir, "push", "-u", "origin", "master")
+ runGit(t, localDir, "push", "-u", "origin", "main")
// Story branch with a feature commit.
runGit(t, localDir, "checkout", "-b", "story/test-feature")
@@ -1845,7 +1845,7 @@ func TestPool_StoryDeploy_MergesStoryBranch(t *testing.T) {
runGit(t, localDir, "add", ".")
runGit(t, localDir, "commit", "-m", "feature work")
runGit(t, localDir, "push", "origin", "story/test-feature")
- runGit(t, localDir, "checkout", "master")
+ runGit(t, localDir, "checkout", "main")
store := testStore(t)
logger := slog.New(slog.NewTextHandler(os.Stderr, &slog.HandlerOptions{Level: slog.LevelError}))
@@ -1872,9 +1872,9 @@ func TestPool_StoryDeploy_MergesStoryBranch(t *testing.T) {
pool.triggerStoryDeploy(context.Background(), story.ID)
- // feature.go should now be on master in the working copy.
+ // feature.go should now be on main in the working copy.
if _, err := os.Stat(filepath.Join(localDir, "feature.go")); os.IsNotExist(err) {
- t.Error("story branch was not merged to master: feature.go missing")
+ t.Error("story branch was not merged to main: feature.go missing")
}
got, _ := store.GetStory(story.ID)
if got.Status != task.StoryDeployed {