Skip to content

Commit c9bf9cb

Browse files
authored
Fix open PR description for SSH remotes (#4786)
* Fix open PR description for SSH remotes Fixes #4768 * Remove path
1 parent 3510d02 commit c9bf9cb

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Diff for: src/github/repositoriesManager.ts

+2-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import * as path from 'path';
76
import * as vscode from 'vscode';
87
import { Repository } from '../api/api';
98
import { AuthProvider } from '../common/authentication';
@@ -126,15 +125,12 @@ export class RepositoriesManager implements vscode.Disposable {
126125
if (issueModel === undefined) {
127126
return undefined;
128127
}
129-
const issueRemoteUrl = issueModel.remote.url.substring(
130-
0,
131-
issueModel.remote.url.length - path.extname(issueModel.remote.url).length,
132-
);
128+
const issueRemoteUrl = `${issueModel.remote.owner.toLowerCase()}/${issueModel.remote.repositoryName.toLowerCase()}`;
133129
for (const folderManager of this._folderManagers) {
134130
if (
135131
folderManager.gitHubRepositories
136132
.map(repo =>
137-
repo.remote.url.substring(0, repo.remote.url.length - path.extname(repo.remote.url).length),
133+
`${repo.remote.owner.toLowerCase()}/${repo.remote.repositoryName.toLowerCase()}`
138134
)
139135
.includes(issueRemoteUrl)
140136
) {

0 commit comments

Comments
 (0)