fix(vloer): match checkouts by forge host and full repo path #157
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ryangr0/vloer-extension-remote-identity"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
remoteMatches in the VS Code extension kept only the last two path parts of
a git remote and compared them to owner/repo, so a clone of the same-named
repository on another forge, or under another GitLab group, was offered as
the Work Item's checkout. decodeURIComponent ran outside the try/catch, so a
badly encoded remote threw instead of not matching.
parseRemote now reads HTTPS, ssh:// (any port) and SCP-style remotes into a
lowercase host and the full path, keeping nested groups and stripping .git;
a malformed or badly encoded remote yields no identity and no match. The
checkout builds the expected repository from the host of the Work Item's
pull request link, the same link the clone offer already uses, and owner/repo
from Ploeg's target. Ploeg's target carries only a forge registry id, so
without a pull request link the full path is matched on any host.
A forge's SSH host often differs from its web host, so hosts also match when
both have at least three labels and share the parent domain below their
first label (forgejo-ssh.webgrip.dev and forgejo.webgrip.dev), or when the
new application-scoped setting vloer.remoteHostAliases maps one to the other.
Refs: VIK-1722
Co-Authored-By: Claude Opus 5.5 (1M context) noreply@anthropic.com
Hosts match when equal, when mapped by the new vloer.remoteHostAliases setting (application scope), or when both have 3+ labels and share the parent domain (forgejo-ssh.webgrip.dev ~ forgejo.webgrip.dev). Before a PR link exists the host is unknown and any host matches the full path; a full fix needs Ploeg to expose the target's forge host.
Verified with
mise run verifyon the pinned toolchain (all gates passed).Ticket: https://vikunja.webgrip.dev/tasks/1722
🤖 Generated with Claude Code