diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-04-28 08:49:27 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-04-28 08:49:27 +0000 |
| commit | b9b0108972cbe532d41519850245adbcf6b4fd93 (patch) | |
| tree | ead50f6f270fabeba7cf91feec8c54b3b166eabf /src/lib/push.rs | |
| parent | 875f4e0a99688c7363cba69c1485af1cd4b34999 (diff) | |
fix(send): repo GRASP servers never tried when pushing PR proposal refs
is_grasp_server_in_list does a direct string comparison, but repo_grasps
(from grasp_servers()) contains normalised hostnames (e.g. relay.ngit.dev)
while repo_ref.git_server holds full clone URLs. They never match, so
to_try was always empty and every PR submission fell through to the fork
creation / personal GRASP server fallback path.
Fix: normalise each clone URL before comparing against repo_grasps.
Diffstat (limited to 'src/lib/push.rs')
| -rw-r--r-- | src/lib/push.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/push.rs b/src/lib/push.rs index 2f9a26a..b4afbf5 100644 --- a/src/lib/push.rs +++ b/src/lib/push.rs | |||
| @@ -470,8 +470,10 @@ pub async fn select_servers_push_refs_and_generate_pr_or_pr_update_event( | |||
| 470 | } | 470 | } |
| 471 | // also use repo grasp servers | 471 | // also use repo grasp servers |
| 472 | for url in &repo_ref.git_server { | 472 | for url in &repo_ref.git_server { |
| 473 | if is_grasp_server_in_list(url, &repo_grasps) && !to_try.contains(url) { | 473 | if let Ok(normalized) = normalize_grasp_server_url(url) { |
| 474 | to_try.push(url.clone()); | 474 | if repo_grasps.contains(&normalized) && !to_try.contains(url) { |
| 475 | to_try.push(url.clone()); | ||
| 476 | } | ||
| 475 | } | 477 | } |
| 476 | } | 478 | } |
| 477 | 479 | ||