Skip to content

Instantly share code, notes, and snippets.

@jkoelker
Created March 22, 2026 01:58
Show Gist options
  • Select an option

  • Save jkoelker/1bf8a0f6dadb2205ad045310ed1b1a67 to your computer and use it in GitHub Desktop.

Select an option

Save jkoelker/1bf8a0f6dadb2205ad045310ed1b1a67 to your computer and use it in GitHub Desktop.
apply-opencode adapter selection
.iter()
.map(|path| {
path.strip_prefix(repo_dir)
.map(|value| value.display().to_string())
.with_context(|| format!("{} did not live under repo root", path.display()))
})
.collect()
}
fn apply_ticket_via_selected_adapter(
ticket: &TicketDocument,
ticket_path: &Path,
repo_dir: &Path,
worker_command: &str,
) -> anyhow::Result<PathBuf> {
match worker_command {
"apply-opencode" => apply_ticket_with_opencode(ticket_path, repo_dir),
_ => apply_ticket(ticket_path, repo_dir),
}
.with_context(|| format!("{} failed for {}", worker_command, ticket.front_matter.id))
}
fn verify_repo_changes_match_targets(
repo_dir: &Path,
allowed_targets: &[String],
) -> anyhow::Result<()> {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment