File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ import {
3939} from './interface' ;
4040import { IssueModel } from './issueModel' ;
4141import { GHPRComment , GHPRCommentThread } from './prComment' ;
42+ import { PullRequestModel } from './pullRequestModel' ;
4243import { RemoteInfo } from '../../common/types' ;
4344import { Repository } from '../api/api' ;
4445import { GitApiImpl } from '../api/api1' ;
@@ -1787,11 +1788,10 @@ export function vscodeDevPrLink(pullRequest: IssueModel) {
17871788 return `https://${ vscode . env . appName . toLowerCase ( ) . includes ( 'insider' ) ? 'insiders.' : '' } vscode.dev/github${ itemUri . path } ` ;
17881789}
17891790
1790- export function codespacesPrLink ( pullRequest : { head : GitHubRef } ) : string {
1791- // GitHub Codespaces URL format: https://github.com/codespaces/new?ref={branch}&repo={owner/repo}
1792- const repoFullName = `${ pullRequest . head . owner } /${ pullRequest . head . name } ` ;
1793- const branch = pullRequest . head . ref ;
1794- return `https://github.com/codespaces/new?ref=${ encodeURIComponent ( branch ) } &repo=${ encodeURIComponent ( repoFullName ) } ` ;
1791+ export function codespacesPrLink ( pullRequest : PullRequestModel ) : string {
1792+ const repoFullName = `${ pullRequest . head ! . owner } /${ pullRequest . remote . repositoryName } ` ;
1793+ const branch = pullRequest . head ! . ref ;
1794+ return `https://github.com/codespaces/new/${ encodeURIComponent ( repoFullName ) } /tree/${ encodeURIComponent ( branch ) } ` ;
17951795}
17961796
17971797export function makeLabel ( label : ILabel ) : string {
You can’t perform that action at this time.
0 commit comments