You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When I run the bundled frontend within pd, I see a footer with version and date information:
That's rad. However, the linked git commit is a broken URL.
Expected behavior
I expect that I can click on the abbreviated hash to be taken to a specific commit in the web repo. The specific URL I was shown is http://localhost:8080/app/[email protected]:penumbra-zone/web/commits/ba65187648cbc963c41ea4297e91676720026acd.
Additional context
The problem is two-fold:
the commit sha is interpolated based on the git remote settings, so in my local build i saw [email protected] rather than https://github.com/
the URL is built as a relative path, meaning the pd endpoint is prefixed to it, as http://localhost:8080/app/ in the example above.
I'd love to work on this issue! I did some research and found that the "GIT_ORIGIN_URL" variable gets its value from "execSync('git remote get-url origin')". This works fine when the repo is cloned using HTTPS, but if it's cloned via SSH, it returns something like [email protected]:username/reponame. When this SSH URL is used in an tag, the browser treats it as a relative URL, which is why it gets prefixed with "http://localhost:.."
The fix is to detect when the fetched URL is in SSH format and convert it to the corresponding HTTPS link before using it. What do you think? Let me know your thoughts!
Describe the bug
When I run the bundled frontend within
pd
, I see a footer with version and date information:That's rad. However, the linked git commit is a broken URL.
Expected behavior
I expect that I can click on the abbreviated hash to be taken to a specific commit in the web repo. The specific URL I was shown is
http://localhost:8080/app/[email protected]:penumbra-zone/web/commits/ba65187648cbc963c41ea4297e91676720026acd
.Additional context
The problem is two-fold:
git remote
settings, so in my local build i saw[email protected]
rather thanhttps://github.com/
http://localhost:8080/app/
in the example above.Encountered this while working on penumbra-zone/penumbra#5089.
The text was updated successfully, but these errors were encountered: