mirror of
https://github.com/reiyua/github-profile-trophy-reiyua-mirror.git
synced 2026-11-17 06:02:09 +11:00
Split issues to openIssues and closedIssues
This commit is contained in:
parent
b2522282b3
commit
4dde40a743
2 changed files with 9 additions and 3 deletions
|
|
@ -53,7 +53,10 @@ export class GithubAPIClient {
|
||||||
const query = `
|
const query = `
|
||||||
query userInfo($username: String!) {
|
query userInfo($username: String!) {
|
||||||
user(login: $username) {
|
user(login: $username) {
|
||||||
issues(first: 1) {
|
openIssues: issues(states: OPEN) {
|
||||||
|
totalCount
|
||||||
|
}
|
||||||
|
closedIssues: issues(states: CLOSED) {
|
||||||
totalCount
|
totalCount
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,10 @@ export type GitHubUserRepository = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export type GitHubUserIssue = {
|
export type GitHubUserIssue = {
|
||||||
issues: {
|
openIssues: {
|
||||||
|
totalCount: number;
|
||||||
|
};
|
||||||
|
closedIssues: {
|
||||||
totalCount: number;
|
totalCount: number;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -84,7 +87,7 @@ export class UserInfo {
|
||||||
: 0;
|
: 0;
|
||||||
this.totalCommits = totalCommits;
|
this.totalCommits = totalCommits;
|
||||||
this.totalFollowers = userActivity.followers.totalCount;
|
this.totalFollowers = userActivity.followers.totalCount;
|
||||||
this.totalIssues = userIssue.issues.totalCount;
|
this.totalIssues = userIssue.openIssues.totalCount + userIssue.closedIssues.totalCount;
|
||||||
this.totalOrganizations = userActivity.organizations.totalCount;
|
this.totalOrganizations = userActivity.organizations.totalCount;
|
||||||
this.totalPullRequests = userPullRequest.pullRequests.totalCount;
|
this.totalPullRequests = userPullRequest.pullRequests.totalCount;
|
||||||
this.totalStargazers = totalStargazers;
|
this.totalStargazers = totalStargazers;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue