From 55e238c3fb2743f0be10867a7e6ffbccd9e1e8a9 Mon Sep 17 00:00:00 2001 From: Cory LaNou Date: Fri, 22 May 2026 11:48:30 -0500 Subject: [PATCH] fix(github): don't synthesize branch_name, defer to workspace fallback The GitHub adapter was synthesizing branch_name as `issue-N-{title-slug}`, which overrode operator-configured `hooks.after_create` branches and broke the Symphony Isolation Contract (which expects `symphony/`). Now the adapter returns `branch_name: nil`, letting workspace.ex's `fallback_branch_name/1` produce `symphony/`. Operators who want title-slug branches can set them in their `hooks.after_create`. Fixes #95. --- elixir/lib/symphony_elixir/github/client.ex | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/elixir/lib/symphony_elixir/github/client.ex b/elixir/lib/symphony_elixir/github/client.ex index 50e31827f1..70f71a2706 100644 --- a/elixir/lib/symphony_elixir/github/client.ex +++ b/elixir/lib/symphony_elixir/github/client.ex @@ -678,7 +678,7 @@ defmodule SymphonyElixir.GitHub.Client do description: content["body"], priority: Priority.rank_for(priority_name, ctx.priority_map), state: github_to_symphony_state(status_name, ctx.state_map), - branch_name: derive_branch_name(number, title), + branch_name: nil, model_override: parse_model_override(content["body"]), url: content["url"], assignee_id: first_assignee_login(assignees), @@ -694,22 +694,6 @@ defmodule SymphonyElixir.GitHub.Client do defp build_identifier(_repo, number) when is_integer(number), do: "##{number}" defp build_identifier(_repo, _number), do: nil - defp derive_branch_name(number, title) when is_integer(number) and is_binary(title) do - slug = - title - |> String.downcase() - |> String.replace(~r/[^a-z0-9]+/, "-") - |> String.trim("-") - |> String.slice(0, 50) - - case slug do - "" -> "issue-#{number}" - s -> "issue-#{number}-#{s}" - end - end - - defp derive_branch_name(_number, _title), do: nil - defp parse_model_override(body) when is_binary(body) do case Regex.run(~r//i, body) do [_match, model] -> String.trim(model)