Bläddra i källkod

adds nodeId to issues and PRs

main
Keith Daulton 1 år sedan
förälder
incheckning
ad4ccb5444
7 ändrade filer med 22 tillägg och 0 borttagningar
  1. +4
    -0
      src/git/models/issue.ts
  2. +2
    -0
      src/git/models/pullRequest.ts
  3. +5
    -0
      src/plus/github/github.ts
  4. +6
    -0
      src/plus/github/models.ts
  5. +3
    -0
      src/plus/gitlab/gitlab.ts
  6. +1
    -0
      src/plus/gitlab/models.ts
  7. +1
    -0
      src/webviews/settings/settingsWebview.ts

+ 4
- 0
src/git/models/issue.ts Visa fil

@ -9,6 +9,7 @@ export interface IssueOrPullRequest {
readonly type: IssueOrPullRequestType;
readonly provider: RemoteProviderReference;
readonly id: string;
readonly nodeId: string | undefined;
readonly title: string;
readonly url: string;
readonly date: Date;
@ -58,6 +59,7 @@ export function serializeIssueOrPullRequest(value: IssueOrPullRequest): IssueOrP
icon: value.provider.icon,
},
id: value.id,
nodeId: value.nodeId,
title: value.title,
url: value.url,
date: value.date,
@ -183,6 +185,7 @@ export function serializeIssue(value: IssueShape): IssueShape {
icon: value.provider.icon,
},
id: value.id,
nodeId: value.nodeId,
title: value.title,
url: value.url,
date: value.date,
@ -223,6 +226,7 @@ export class Issue implements IssueShape {
constructor(
public readonly provider: RemoteProviderReference,
public readonly id: string,
public readonly nodeId: string | undefined,
public readonly title: string,
public readonly url: string,
public readonly date: Date,

+ 2
- 0
src/git/models/pullRequest.ts Visa fil

@ -73,6 +73,7 @@ export function serializePullRequest(value: PullRequest): PullRequestShape {
icon: value.provider.icon,
},
id: value.id,
nodeId: value.nodeId,
title: value.title,
url: value.url,
date: value.date,
@ -133,6 +134,7 @@ export class PullRequest implements PullRequestShape {
readonly url: string;
},
public readonly id: string,
public readonly nodeId: string | undefined,
public readonly title: string,
public readonly url: string,
public readonly state: PullRequestState,

+ 5
- 0
src/plus/github/github.ts Visa fil

@ -103,6 +103,7 @@ headRepository {
url
}
permalink
id
number
title
state
@ -155,6 +156,7 @@ const issueNodeProperties = `
comments {
totalCount
}
id
number
title
url
@ -488,6 +490,7 @@ export class GitHubApi implements Disposable {
createdAt
closed
closedAt
id
title
url
state
@ -496,6 +499,7 @@ export class GitHubApi implements Disposable {
createdAt
closed
closedAt
id
title
url
state
@ -524,6 +528,7 @@ export class GitHubApi implements Disposable {
provider: provider,
type: issue.type,
id: String(number),
nodeId: issue.id,
date: new Date(issue.createdAt),
title: issue.title,
closed: issue.closed,

+ 6
- 0
src/plus/github/models.ts Visa fil

@ -45,6 +45,8 @@ export interface GitHubCommitRef {
export type GitHubContributor = Endpoints['GET /repos/{owner}/{repo}/contributors']['response']['data'][0];
export interface GitHubIssueOrPullRequest {
id: string;
nodeId: string;
type: IssueOrPullRequestType;
number: number;
createdAt: string;
@ -76,6 +78,7 @@ export interface GitHubPullRequest {
};
permalink: string;
number: number;
id: string;
title: string;
state: GitHubPullRequestState;
updatedAt: string;
@ -172,6 +175,7 @@ export function fromGitHubPullRequest(pr: GitHubPullRequest, provider: RichRemot
url: pr.author.url,
},
String(pr.number),
pr.id,
pr.title,
pr.permalink,
fromGitHubPullRequestState(pr.state),
@ -253,6 +257,7 @@ export function fromGitHubPullRequestDetailed(
url: pr.author.url,
},
String(pr.number),
pr.id,
pr.title,
pr.permalink,
fromGitHubPullRequestState(pr.state),
@ -309,6 +314,7 @@ export function fromGitHubIssueDetailed(value: GitHubIssueDetailed, provider: Ri
icon: provider.icon,
},
String(value.number),
value.id,
value.title,
value.url,
new Date(value.createdAt),

+ 3
- 0
src/plus/gitlab/gitlab.ts Visa fil

@ -320,6 +320,7 @@ export class GitLabApi implements Disposable {
provider: provider,
type: 'issue',
id: issue.iid,
nodeId: undefined,
date: new Date(issue.createdAt),
title: issue.title,
closed: issue.state === 'closed',
@ -335,6 +336,7 @@ export class GitLabApi implements Disposable {
provider: provider,
type: 'pullrequest',
id: mergeRequest.iid,
nodeId: undefined,
date: new Date(mergeRequest.createdAt),
title: mergeRequest.title,
closed: mergeRequest.state === 'closed',
@ -487,6 +489,7 @@ export class GitLabApi implements Disposable {
url: pr.author?.webUrl ?? '',
},
String(pr.iid),
undefined,
pr.title,
pr.webUrl,
fromGitLabMergeRequestState(pr.state),

+ 1
- 0
src/plus/gitlab/models.ts Visa fil

@ -98,6 +98,7 @@ export function fromGitLabMergeRequestREST(pr: GitLabMergeRequestREST, provider:
url: pr.author?.web_url ?? '',
},
String(pr.iid),
undefined,
pr.title,
pr.web_url,
fromGitLabMergeRequestState(pr.state),

+ 1
- 0
src/webviews/settings/settingsWebview.ts Visa fil

@ -200,6 +200,7 @@ export class SettingsWebviewProvider implements WebviewProvider {
url: 'https://github.com/eamodio',
},
'1',
undefined,
'Supercharged',
'https://github.com/gitkraken/vscode-gitlens/pulls/1',
'merged',

Laddar…
Avbryt
Spara