Hold a task's merge while another task in the project is merging
This commit is contained in:
@@ -262,6 +262,7 @@ func (m *Manager) leadTools(l *live) []mcp.Tool {
|
||||
|
||||
tool("merge_task",
|
||||
"Merge a task as the human: its agent merges the default branch in, then byre squashes it into one commit, pushes it to origin and closes the task. "+
|
||||
"While another task in the project is merging, byre holds the merge and starts it when that one is done. "+
|
||||
"Only when the human asks. You get a signal when it is merged; failures are filed in the task's inbox.",
|
||||
taskOnly,
|
||||
func(ctx context.Context, user api.User, raw json.RawMessage) (string, error) {
|
||||
@@ -269,10 +270,13 @@ func (m *Manager) leadTools(l *live) []mcp.Tool {
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
_, err = m.Merge(ctx, task, project, user)
|
||||
task, err = m.Merge(ctx, task, project, user)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
if task.MergeQueuedAt != nil {
|
||||
return fmt.Sprintf("Merge of %s held until the merge in progress in its project is done.", task.Id), nil
|
||||
}
|
||||
return fmt.Sprintf("Merge of %s started.", task.Id), nil
|
||||
}),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user