From b9b0108972cbe532d41519850245adbcf6b4fd93 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Tue, 28 Apr 2026 08:49:27 +0000 Subject: 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. --- CHANGELOG.md | 4 ++++ src/lib/push.rs | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3a93bb..6147439 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- when submitting a PR (via `--force-pr` or when the existing proposal is already a PR kind), repository GRASP servers were never tried when pushing proposal refs; a URL normalisation mismatch (`repo_grasps` holds normalised hostnames but the comparison was made against full clone URLs) meant the candidate server list was always empty, so every submission fell through to the fork-creation / personal GRASP server fallback path instead of pushing directly to the repository's own GRASP servers + ## [2.4.1] - 2026-04-22 ### Fixed 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( } // also use repo grasp servers for url in &repo_ref.git_server { - if is_grasp_server_in_list(url, &repo_grasps) && !to_try.contains(url) { - to_try.push(url.clone()); + if let Ok(normalized) = normalize_grasp_server_url(url) { + if repo_grasps.contains(&normalized) && !to_try.contains(url) { + to_try.push(url.clone()); + } } } -- cgit v1.2.3