diff options
Diffstat (limited to 'internal/executor/executor.go')
| -rw-r--r-- | internal/executor/executor.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/internal/executor/executor.go b/internal/executor/executor.go index c5a1fce..4183ab0 100644 --- a/internal/executor/executor.go +++ b/internal/executor/executor.go @@ -280,6 +280,12 @@ func (p *Pool) executeResume(ctx context.Context, t *task.Task, exec *storage.Ex t.RepositoryURL = proj.RemoteURL } } + // Populate BranchName from Story if missing (ADR-007). + if t.BranchName == "" && t.StoryID != "" { + if story, err := p.store.GetStory(t.StoryID); err == nil && story.BranchName != "" { + t.BranchName = story.BranchName + } + } err = runner.Run(ctx, t, exec) exec.EndTime = time.Now().UTC() @@ -868,6 +874,12 @@ func (p *Pool) execute(ctx context.Context, t *task.Task) { t.RepositoryURL = proj.RemoteURL } } + // Populate BranchName from Story if missing (ADR-007). + if t.BranchName == "" && t.StoryID != "" { + if story, err := p.store.GetStory(t.StoryID); err == nil && story.BranchName != "" { + t.BranchName = story.BranchName + } + } // Run the task. err = runner.Run(ctx, t, exec) |
