Fix GitHub commit permalinks (#9961)
This PR fixes an issue where GitHub commit permalinks were being
constructed with the wrong URL segment.
This would result in clicking on a commit from the Git blame view taking
you to the wrong page on GitHub.
### Before
```
https://github.com/zed-industries/zed/commits/a3d985028ccce085e4f5a06694835cd9b3296dba
```
<img width="1654" alt="Screenshot 2024-03-29 at 12 59 51 PM"
src="https://github.com/zed-industries/zed/assets/1486634/122fd678-de56-42cb-a0c5-1ce1b9b104b5">
### After
```
a3d985028c
```
<img width="1654" alt="Screenshot 2024-03-29 at 12 59 56 PM"
src="https://github.com/zed-industries/zed/assets/1486634/1c92b2ef-7925-46bc-aebf-b739be1eae74">
Release Notes:
- N/A
This commit is contained in:
parent
64ea74d1db
commit
a4b55b9924
1 changed files with 1 additions and 1 deletions
|
@ -111,7 +111,7 @@ pub(crate) fn build_commit_permalink(params: BuildCommitPermalinkParams) -> Url
|
|||
} = remote;
|
||||
|
||||
let path = match provider {
|
||||
GitHostingProvider::Github => format!("{owner}/{repo}/commits/{sha}"),
|
||||
GitHostingProvider::Github => format!("{owner}/{repo}/commit/{sha}"),
|
||||
GitHostingProvider::Gitlab => format!("{owner}/{repo}/-/commit/{sha}"),
|
||||
GitHostingProvider::Gitee => format!("{owner}/{repo}/commit/{sha}"),
|
||||
GitHostingProvider::Bitbucket => format!("{owner}/{repo}/commits/{sha}"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue