|
@ -1,5 +1,5 @@ |
|
|
import { Disposable, env, EventEmitter, ProgressLocation, Uri, window, workspace } from 'vscode'; |
|
|
import { Disposable, env, EventEmitter, ProgressLocation, Uri, window, workspace } from 'vscode'; |
|
|
import type { StoredDeepLinkContext } from '../../constants'; |
|
|
|
|
|
|
|
|
import type { StoredDeepLinkContext, StoredNamedRef } from '../../constants'; |
|
|
import { Commands } from '../../constants'; |
|
|
import { Commands } from '../../constants'; |
|
|
import type { Container } from '../../container'; |
|
|
import type { Container } from '../../container'; |
|
|
import { getBranchNameWithoutRemote } from '../../git/models/branch'; |
|
|
import { getBranchNameWithoutRemote } from '../../git/models/branch'; |
|
@ -691,14 +691,14 @@ export class DeepLinkService implements Disposable { |
|
|
async copyDeepLinkUrl( |
|
|
async copyDeepLinkUrl( |
|
|
repoPath: string, |
|
|
repoPath: string, |
|
|
remoteUrl: string, |
|
|
remoteUrl: string, |
|
|
compareRef?: string, |
|
|
|
|
|
compareWithRef?: string, |
|
|
|
|
|
|
|
|
compareRef?: StoredNamedRef, |
|
|
|
|
|
compareWithRef?: StoredNamedRef, |
|
|
): Promise<void>; |
|
|
): Promise<void>; |
|
|
async copyDeepLinkUrl( |
|
|
async copyDeepLinkUrl( |
|
|
refOrRepoPath: string | GitReference, |
|
|
refOrRepoPath: string | GitReference, |
|
|
remoteUrl: string, |
|
|
remoteUrl: string, |
|
|
compareRef?: string, |
|
|
|
|
|
compareWithRef?: string, |
|
|
|
|
|
|
|
|
compareRef?: StoredNamedRef, |
|
|
|
|
|
compareWithRef?: StoredNamedRef, |
|
|
): Promise<void> { |
|
|
): Promise<void> { |
|
|
const url = await (typeof refOrRepoPath === 'string' |
|
|
const url = await (typeof refOrRepoPath === 'string' |
|
|
? this.generateDeepLinkUrl(refOrRepoPath, remoteUrl, compareRef, compareWithRef) |
|
|
? this.generateDeepLinkUrl(refOrRepoPath, remoteUrl, compareRef, compareWithRef) |
|
@ -710,14 +710,14 @@ export class DeepLinkService implements Disposable { |
|
|
async generateDeepLinkUrl( |
|
|
async generateDeepLinkUrl( |
|
|
repoPath: string, |
|
|
repoPath: string, |
|
|
remoteUrl: string, |
|
|
remoteUrl: string, |
|
|
compareRef?: string, |
|
|
|
|
|
compareWithRef?: string, |
|
|
|
|
|
|
|
|
compareRef?: StoredNamedRef, |
|
|
|
|
|
compareWithRef?: StoredNamedRef, |
|
|
): Promise<URL>; |
|
|
): Promise<URL>; |
|
|
async generateDeepLinkUrl( |
|
|
async generateDeepLinkUrl( |
|
|
refOrRepoPath: string | GitReference, |
|
|
refOrRepoPath: string | GitReference, |
|
|
remoteUrl: string, |
|
|
remoteUrl: string, |
|
|
compareRef?: string, |
|
|
|
|
|
compareWithRef?: string, |
|
|
|
|
|
|
|
|
compareRef?: StoredNamedRef, |
|
|
|
|
|
compareWithRef?: StoredNamedRef, |
|
|
): Promise<URL> { |
|
|
): Promise<URL> { |
|
|
const repoPath = typeof refOrRepoPath !== 'string' ? refOrRepoPath.repoPath : refOrRepoPath; |
|
|
const repoPath = typeof refOrRepoPath !== 'string' ? refOrRepoPath.repoPath : refOrRepoPath; |
|
|
let repoId; |
|
|
let repoId; |
|
@ -751,8 +751,8 @@ export class DeepLinkService implements Disposable { |
|
|
|
|
|
|
|
|
if (compareRef != null && compareWithRef != null) { |
|
|
if (compareRef != null && compareWithRef != null) { |
|
|
targetType = DeepLinkType.Comparison; |
|
|
targetType = DeepLinkType.Comparison; |
|
|
targetId = compareRef; |
|
|
|
|
|
compareWithTargetId = compareWithRef; |
|
|
|
|
|
|
|
|
targetId = compareRef.label ?? compareRef.ref; |
|
|
|
|
|
compareWithTargetId = compareWithRef.label ?? compareWithRef.ref; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const schemeOverride = configuration.get('deepLinks.schemeOverride'); |
|
|
const schemeOverride = configuration.get('deepLinks.schemeOverride'); |
|
|