mirror of
https://github.com/tiennm99/github-readme-stats.git
synced 2026-08-06 22:22:04 +00:00
Added pr reviews to stats (#1404)
* Added pr reviews to stats * Add 'show' query parameter * Fix show test * refactoring * cleanup * refactor: restructure stats-card code --------- Co-authored-by: Markus <markus.tyrkko@gmail.com> Co-authored-by: Alexandr <qwerty541zxc@gmail.com> Co-authored-by: rickstaa <rick.staa@outlook.com>
This commit is contained in:
co-authored by
Markus
Alexandr
rickstaa
parent
c86cc72df2
commit
1bb65ddc29
@@ -45,7 +45,8 @@ const GRAPHQL_STATS_QUERY = `
|
||||
name
|
||||
login
|
||||
contributionsCollection {
|
||||
totalCommitContributions
|
||||
totalCommitContributions,
|
||||
totalPullRequestReviewContributions
|
||||
}
|
||||
repositoriesContributedTo(first: 1, contributionTypes: [COMMIT, ISSUE, PULL_REQUEST, REPOSITORY]) {
|
||||
totalCount
|
||||
@@ -185,6 +186,7 @@ const fetchStats = async (
|
||||
const stats = {
|
||||
name: "",
|
||||
totalPRs: 0,
|
||||
totalReviews: 0,
|
||||
totalCommits: 0,
|
||||
totalIssues: 0,
|
||||
totalStars: 0,
|
||||
@@ -227,6 +229,8 @@ const fetchStats = async (
|
||||
}
|
||||
|
||||
stats.totalPRs = user.pullRequests.totalCount;
|
||||
stats.totalReviews =
|
||||
user.contributionsCollection.totalPullRequestReviewContributions;
|
||||
stats.totalIssues = user.openIssues.totalCount + user.closedIssues.totalCount;
|
||||
stats.contributedTo = user.repositoriesContributedTo.totalCount;
|
||||
|
||||
|
||||
Vendored
+1
@@ -18,6 +18,7 @@ export type RepositoryData = {
|
||||
export type StatsData = {
|
||||
name: string;
|
||||
totalPRs: number;
|
||||
totalReviews: number;
|
||||
totalCommits: number;
|
||||
totalIssues: number;
|
||||
totalStars: number;
|
||||
|
||||
Reference in New Issue
Block a user