Monorepo for Tangled โ€” https://tangled.org

appview/pages: Strip HTTP port from SSH clone URLs #749

merged
opened by evan.jarrett.net targeting master from evan.jarrett.net/core: ssh-strip-port

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 stripPort template helper function to appview/pages/funcmap.go
  • Updated appview/pages/templates/repo/empty.html to use stripPort filter
  • Updated appview/pages/templates/repo/fragments/cloneDropdown.html to use stripPort filter
0
by evan.jarrett.net 1 comment
expand 1 commit
appview/pages: Strip HTTP port from SSH clone URLs

lgtm!

even better would be if we knew what port the knot was listening on and add that to the url.

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.

pull request successfully merged
sign up or login to add to the discussion
Labels
bugfix
assignee

None yet.

Participants 2
AT URI
at://did:plc:pddp4xt5lgnv2qsegbzzs4xg/sh.tangled.repo.pull/3m4rp2s4s3e22