summaryrefslogtreecommitdiff
path: root/makima/src/orchestration
diff options
context:
space:
mode:
Diffstat (limited to 'makima/src/orchestration')
-rw-r--r--makima/src/orchestration/directive.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/makima/src/orchestration/directive.rs b/makima/src/orchestration/directive.rs
index 80e2a8b..044fce6 100644
--- a/makima/src/orchestration/directive.rs
+++ b/makima/src/orchestration/directive.rs
@@ -758,7 +758,10 @@ async fn dispatch_step(
.await
.map_err(|e| format!("Failed to update step status: {}", e))?;
- // Create contract for this step
+ // Create contract for this step.
+ // Step contracts use the directive's repository config — not local_only,
+ // so they can branch and merge to share work across steps.
+ let has_repo = directive.repository_url.is_some() || directive.local_path.is_some();
let contract = repository::create_contract_for_owner(
pool,
owner_id,
@@ -770,8 +773,8 @@ async fn dispatch_step(
initial_phase: step.initial_phase.clone(),
autonomous_loop: Some(true),
phase_guard: None,
- local_only: Some(true),
- auto_merge_local: None,
+ local_only: Some(!has_repo),
+ auto_merge_local: if has_repo { Some(true) } else { None },
},
)
.await