feat(taskactions): archive reaps the task's worktree; cleanup test models a completed run
A worktree terminal cleanup keeps (uncaptured or unreadable work) now has a reap path: archiving calls Daemon.RemoveWorktree for the owning identity's trees, and the keep logs name archive as the way out. The no-change cleanup test reports completed through one direct transition instead of reaching merged via a faked pr_open hop.
This commit is contained in:
6 files changed
+73
-29
No files matched your search
@@ -20,6 +20,7 @@ func (b *boot) taskActions() taskactions.Service {
|
||||
b.cancelTask,
|
||||
b.closeIssue,
|
||||
b.removeTaskLogs,
|
||||
b.removeTaskWorktree,
|
||||
b.publishEvent,
|
||||
b.log.Warn,
|
||||
)
|
||||
@@ -46,6 +47,13 @@ func (b *boot) removeTaskLogs(id int64) error {
|
||||
return b.taskLogs.Remove(id)
|
||||
}
|
||||
|
||||
func (b *boot) removeTaskWorktree(task *taskactions.Task) error {
|
||||
if b.d == nil {
|
||||
return nil
|
||||
}
|
||||
return b.d.RemoveWorktree(task.Owner, task.Repo, task.Identity, task.IssueNumber)
|
||||
}
|
||||
|
||||
func (b *boot) publishEvent(e events.Event) {
|
||||
if b.bus != nil {
|
||||
b.bus.Publish(e)
|
||||
|
||||
Reference in new issue
Block a user