-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Description
Some context: I'm preparing a repo to be merged into another repo and I'm rewriting commit messages so that the PR references in the hovers will still link back to the original repo. I think this is possible by changing the references from #[pr-number] to [owner]/[repo]#[pr-number] based on this regex. For example: try a rewritten squash (#3) -> try a rewritten squash (Jacksondr5/test-repo#3)
However, the hover opens a link with encoded backslashes in the repo name: https://github.com/Jacksondr5/test%5C-repo%5C/pull/3 . This also happens in the owner/org if there is a hyphen in the name. I've done a little digging and I think the issue is that the text is being escaped before the link is generated. I'll try to do some more digging later this week.
Is this a valid use case? Am I doing this the wrong way?
Reproduction steps (already done in this repo):
- Start with a repo that has a commit history with PR merges in it
- Rewrite commits using git-filter-repo:
git filter-repo --replace-message replace.txt - Hover over blame in editor to trigger GitLens hover
- Click PR reference in commit message
GitLens Version
13.5.0
VS Code Version
Version: 1.77.1 (user setup)
Commit: b7886d7461186a5eac768481578c1d7ca80e2d21
Date: 2023-04-04T23:21:11.906Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Windows_NT x64 10.0.22621
Sandboxed: No
Git Version
git version 2.34.1

