Build deployment git URLs from the API origin (#482)
When the web UI and the API are served from different origins, deployment git URLs were built from the web origin, where the git smart-HTTP route is not served — cloning the returned URL failed with "repository not found". The configured API origin is now passed into the HTTP server and preferred when building git URLs, covering the dedicated git-url endpoint and the gitUrl fields on deployment list and detail; the existing header-derived fallbacks are unchanged. An integration test starts separate loopback API and web servers, fetches the git URL, and clones it directly. COAUTHORS l ⚠i t l **Deployment notes** Adds optional config.apiBaseUrl consulted first when building deployment git URLs; falls back to publicUrl then Host headers, so existing configs behave identically until the new field is set. Orgs whose deployments currently clone via publicUrl keep working; setting apiBaseUrl changes URLs handed to NEW clone/push operations only. <!-- codesmith:footer --> --- <a href="https://app.blacksmith.sh/yc-software/codesmith/qm/pr/482"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v2.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-light-v2.svg"><img alt="View with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v2.svg"></picture></a> <a href="https://backend.blacksmith.sh/track/enable-autofix?expires=1789249181&installation_model_id=19911&pr_number=482&repository=yc-software%2Fqm&return_to=https%3A%2F%2Fgithub.com%2Fyc-software%2Fqm%2Fpull%2F482&signature=a29f271338fa09610cf18c51d70b44fee6c9425d3351b06265f4707fb29c3899"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img alt="Autofix with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"></picture></a> <sup>Need help on this PR? Tag <code>@codesmith-bot</code> with what you need. Autofix is disabled.</sup> <!-- codesmith:autofix:disabled --> <!-- /codesmith:footer -->
R
Regan Bell committed
ee2cbd61de730391df4fc5fbb1db98e54b69ed0c
Parent: f32ec42
Committed by GitHub <noreply@github.com>
on 8/13/2026, 10:27:06 PM