Summary#
Fixes SSH clone URL display to show correct format without HTTP API port.
SSH URLs were displaying with the HTTP API port:
git@localhost:6000:evan.jarrett.net/atcr-test
Strip the HTTP port from hostnames in SSH URL so that it becomes:
git@localhost:evan.jarrett.net/atcr-test
Note: even better would be if we knew what port the knot was listening on and add that to the url.
Changes#
- Added
stripPorttemplate helper function toappview/pages/funcmap.go - Updated
appview/pages/templates/repo/empty.htmlto usestripPortfilter - Updated
appview/pages/templates/repo/fragments/cloneDropdown.htmlto usestripPortfilter
lgtm!
this one is slightly trickier, for example, the dev knot is configured to work on 6000, but qemu is configured to expose SSH over 2222. probably need to scan ports to figure it out otherwise? i know forgejo just lets the end user declare the port to be displayed on the UI, could do something similar.