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 | |
| 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.
| -rw-r--r-- | CHANGELOG.md | 4 | ||||
| -rw-r--r-- | 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 | |||
| 7 | 7 | ||
| 8 | ## [Unreleased] | 8 | ## [Unreleased] |
| 9 | 9 | ||
| 10 | ### Fixed | ||
| 11 | |||
| 12 | - 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 | ||
| 13 | |||
| 10 | ## [2.4.1] - 2026-04-22 | 14 | ## [2.4.1] - 2026-04-22 |
| 11 | 15 | ||
| 12 | ### Fixed | 16 | ### 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( | |||
| 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 | ||