Bladeren bron

Changes remote provider in api to an object

main
Eric Amodio 3 jaren geleden
bovenliggende
commit
6a2cf08f2b
2 gewijzigde bestanden met toevoegingen van 21 en 4 verwijderingen
  1. +8
    -2
      src/api/gitlens.d.ts
  2. +13
    -2
      src/views/viewCommands.ts

+ 8
- 2
src/api/gitlens.d.ts Bestand weergeven

@ -3,13 +3,19 @@ import { Disposable } from 'vscode';
export { Disposable } from 'vscode';
export interface RemoteProvider {
readonly id: string;
readonly name: string;
readonly domain: string;
}
export interface CreatePullRequestActionContext {
readonly type: 'createPullRequest';
readonly branch: {
readonly name: string;
readonly remote?: {
readonly name: string;
readonly provider?: string;
readonly provider?: RemoteProvider;
readonly url?: string;
};
readonly repoPath: string;
@ -20,7 +26,7 @@ export interface OpenPullRequestActionContext {
readonly type: 'openPullRequest';
readonly pullRequest: {
readonly id: string;
readonly provider: string;
readonly provider?: RemoteProvider;
readonly repoPath: string;
readonly url: string;
};

+ 13
- 2
src/views/viewCommands.ts Bestand weergeven

@ -290,7 +290,14 @@ export class ViewCommands {
remote != null
? {
name: remote.name,
provider: remote.provider?.name,
provider:
remote.provider != null
? {
id: remote.provider.id,
name: remote.provider.name,
domain: remote.provider.domain,
}
: undefined,
url: remote.url,
}
: undefined,
@ -409,7 +416,11 @@ export class ViewCommands {
return executeActionCommand<OpenPullRequestActionContext>('openPullRequest', {
pullRequest: {
id: node.pullRequest.id,
provider: node.pullRequest.provider.name,
provider: {
id: node.pullRequest.provider.id,
name: node.pullRequest.provider.name,
domain: node.pullRequest.provider.domain,
},
repoPath: node.uri.repoPath!,
url: node.pullRequest.url,
},

Laden…
Annuleren
Opslaan