Unverified Commit d049f068 authored by Anurag Hazra's avatar Anurag Hazra Committed by GitHub
Browse files

fix: hotfix for graphql api error (#1409)

parent 02e714ae
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -25,7 +25,10 @@ const fetcher = (variables, token) => {
          pullRequests(first: 1) {
            totalCount
          }
          issues(first: 1) {
          openIssues: issues(states: OPEN) {
            totalCount
          }
          closedIssues: issues(states: CLOSED) {
            totalCount
          }
          followers {
@@ -114,7 +117,7 @@ async function fetchStats(
  const user = res.data.data.user;

  stats.name = user.name || user.login;
  stats.totalIssues = user.issues.totalCount;
  stats.totalIssues = user.openIssues.totalCount + user.closedIssues.totalCount;

  // normal commits
  stats.totalCommits = user.contributionsCollection.totalCommitContributions;
+2 −1
Original line number Diff line number Diff line
@@ -35,7 +35,8 @@ const data = {
        restrictedContributionsCount: 100,
      },
      pullRequests: { totalCount: stats.totalPRs },
      issues: { totalCount: stats.totalIssues },
      openIssues: { totalCount: stats.totalIssues },
      closedIssues: { totalCount: 0 },
      followers: { totalCount: 0 },
      repositories: {
        totalCount: 1,
+2 −1
Original line number Diff line number Diff line
@@ -14,7 +14,8 @@ const data = {
        restrictedContributionsCount: 50,
      },
      pullRequests: { totalCount: 300 },
      issues: { totalCount: 200 },
      openIssues: { totalCount: 100 },
      closedIssues: { totalCount: 100 },
      followers: { totalCount: 100 },
      repositories: {
        totalCount: 5,