/* eslint-disable import/no-unused-modules */
const savedRepos = {
  user: {
    repositories: {
      edges: [
        {
          node: {
            id: 'MDEwOlJlcG9zaXRvcnkxMTYyNzE4MDk=',
            name: 'autark-network',
            description:
              'With an integrated set of collaborative tools, we want to make planning and executing a space mission a simple and sleek process.',
            owner: {
              id: 'MDEyOk9yZ2FuaXphdGlvbjM0MDE4MzU5',
              login: 'autark',
            },
            refs: {
              edges: [
                {
                  node: {
                    name: 'master',
                    target: {
                      history: {
                        totalCount: 90,
                      },
                    },
                  },
                },
                {
                  node: {
                    name: 'yalda',
                    target: {
                      history: {
                        totalCount: 59,
                      },
                    },
                  },
                },
              ],
            },
            issues: {
              totalCount: 34,
              edges: [
                {
                  node: {
                    id: 'MDU6SXNzdWUyOTA2Njc3MTY=',
                    title: 'Design an interactive knowledge base',
                    state: 'OPEN',
                    url:
                      'https://github.com/AutarkLabs/autark-network/issues/1',
                    createdAt: '2018-01-23T00:37:07Z',
                    number: 1,
                    repository: {
                      id: 'MDEwOlJlcG9zaXRvcnkxMTYyNzE4MDk=',
                      name: 'autark-network',
                      nameWithOwner: 'autark/autark-network',
                    },
                    milestone: null,
                    labels: {
                      totalCount: 1,
                      edges: [
                        {
                          node: {
                            id: 'MDU6TGFiZWw3OTUwMTMwMDA=',
                            name: 'enhancement',
                            description: 'New feature or request',
                            color: '84b6eb',
                            url:
                              'https://github.com/AutarkLabs/autark-network/labels/enhancement',
                          },
                        },
                      ],
                    },
                  },
                },
                {
                  node: {
                    id: 'MDU6SXNzdWUyOTE3MDI1ODM=',
                    title: 'Load more link in forum isn\'t loading more',
                    state: 'CLOSED',
                    url:
                      'https://github.com/AutarkLabs/autark-network/issues/2',
                    createdAt: '2018-01-25T20:20:09Z',
                    number: 2,
                    repository: {
                      id: 'MDEwOlJlcG9zaXRvcnkxMTYyNzE4MDk=',
                      name: 'autark-network',
                      nameWithOwner: 'autark/autark-network',
                    },
                    milestone: null,
                    labels: {
                      totalCount: 2,
                      edges: [
                        {
                          node: {
                            id: 'MDU6TGFiZWw3OTUwMTI5OTg=',
                            name: 'bug',
                            description: 'Something isn\'t working',
                            color: 'ee0701',
                            url:
                              'https://github.com/AutarkLabs/autark-network/labels/bug',
                          },
                        },
                        {
                          node: {
                            id: 'MDU6TGFiZWw4NzI0Nzg5MzQ=',
                            name: 'points: 8',
                            description: '',
                            color: 'c5def5',
                            url:
                              'https://github.com/AutarkLabs/autark-network/labels/points%3A%208',
                          },
                        },
                      ],
                    },
                  },
                },
                {
                  node: {
                    id: 'MDU6SXNzdWUyOTE3MDI4OTU=',
                    title:
                      'Year is not always displaying properly in forum posts',
                    state: 'CLOSED',
                    url:
                      'https://github.com/AutarkLabs/autark-network/issues/3',
                    createdAt: '2018-01-25T20:21:18Z',
                    number: 3,
                    repository: {
                      id: 'MDEwOlJlcG9zaXRvcnkxMTYyNzE4MDk=',
                      name: 'autark-network',
                      nameWithOwner: 'autark/autark-network',
                    },
                    milestone: null,
                    labels: {
                      totalCount: 1,
                      edges: [
                        {
                          node: {
                            id: 'MDU6TGFiZWw3OTUwMTI5OTg=',
                            name: 'bug',
                            description: 'Something isn\'t working',
                            color: 'ee0701',
                            url:
                              'https://github.com/AutarkLabs/autark-network/labels/bug',
                          },
                        },
                      ],
                    },
                  },
                },
                {
                  node: {
                    id: 'MDU6SXNzdWUyOTQwMjc5NjI=',
                    title:
                      'Make updates to the "Activity" that is being displayed',
                    state: 'OPEN',
                    url:
                      'https://github.com/AutarkLabs/autark-network/issues/4',
                    createdAt: '2018-02-02T21:24:52Z',
                    number: 4,
                    repository: {
                      id: 'MDEwOlJlcG9zaXRvcnkxMTYyNzE4MDk=',
                      name: 'autark-network',
                      nameWithOwner: 'autark/autark-network',
                    },
                    milestone: null,
                    labels: {
                      totalCount: 0,
                      edges: [],
                    },
                  },
                },
                {
                  node: {
                    id: 'MDU6SXNzdWUyOTUyMzUwMzk=',
                    title: 'Validate that user\'s email domain is valid',
                    state: 'OPEN',
                    url:
                      'https://github.com/AutarkLabs/autark-network/issues/5',
                    createdAt: '2018-02-07T17:57:42Z',
                    number: 5,
                    repository: {
                      id: 'MDEwOlJlcG9zaXRvcnkxMTYyNzE4MDk=',
                      name: 'autark-network',
                      nameWithOwner: 'autark/autark-network',
                    },
                    milestone: null,
                    labels: {
                      totalCount: 0,
                      edges: [],
                    },
                  },
                },
                {
                  node: {
                    id: 'MDU6SXNzdWUyOTYxMzkyNzA=',
                    title:
                      'reusing mail address during registration results in 500',
                    state: 'OPEN',
                    url:
                      'https://github.com/AutarkLabs/autark-network/issues/7',
                    createdAt: '2018-02-10T22:15:57Z',
                    number: 7,
                    repository: {
                      id: 'MDEwOlJlcG9zaXRvcnkxMTYyNzE4MDk=',
                      name: 'autark-network',
                      nameWithOwner: 'autark/autark-network',
                    },
                    milestone: null,
                    labels: {
                      totalCount: 0,
                      edges: [],
                    },
                  },
                },
                {
                  node: {
                    id: 'MDU6SXNzdWUyOTYxNDA1MjE=',
                    title: 'add youtube URL to footer',
                    state: 'CLOSED',
                    url:
                      'https://github.com/AutarkLabs/autark-network/issues/8',
                    createdAt: '2018-02-10T22:35:14Z',
                    number: 8,
                    repository: {
                      id: 'MDEwOlJlcG9zaXRvcnkxMTYyNzE4MDk=',
                      name: 'autark-network',
                      nameWithOwner: 'autark/autark-network',
                    },
                    milestone: null,
                    labels: {
                      totalCount: 0,
                      edges: [],
                    },
                  },
                },
                {
                  node: {
                    id: 'MDU6SXNzdWUyOTczMTE5MTc=',
                    title:
                      'Send email notifications for replies to forum posts',
                    state: 'OPEN',
                    url:
                      'https://github.com/AutarkLabs/autark-network/issues/9',
                    createdAt: '2018-02-15T02:27:11Z',
                    number: 9,
                    repository: {
                      id: 'MDEwOlJlcG9zaXRvcnkxMTYyNzE4MDk=',
                      name: 'autark-network',
                      nameWithOwner: 'autark/autark-network',
                    },
                    milestone: null,
                    labels: {
                      totalCount: 1,
                      edges: [
                        {
                          node: {
                            id: 'MDU6TGFiZWw4NzI0NzYyOTU=',
                            name: 'points: 13',
                            description: '',
                            color: 'c5def5',
                            url:
                              'https://github.com/AutarkLabs/autark-network/labels/points%3A%2013',
                          },
                        },
                      ],
                    },
                  },
                },
                {
                  node: {
                    id: 'MDU6SXNzdWUyOTg2NTc1Njc=',
                    title: 'Forum text selection is bad on mobile',
                    state: 'OPEN',
                    url:
                      'https://github.com/AutarkLabs/autark-network/issues/10',
                    createdAt: '2018-02-20T16:22:47Z',
                    number: 10,
                    repository: {
                      id: 'MDEwOlJlcG9zaXRvcnkxMTYyNzE4MDk=',
                      name: 'autark-network',
                      nameWithOwner: 'autark/autark-network',
                    },
                    milestone: null,
                    labels: {
                      totalCount: 1,
                      edges: [
                        {
                          node: {
                            id: 'MDU6TGFiZWw3OTUwMTI5OTg=',
                            name: 'bug',
                            description: 'Something isn\'t working',
                            color: 'ee0701',
                            url:
                              'https://github.com/AutarkLabs/autark-network/labels/bug',
                          },
                        },
                      ],
                    },
                  },
                },
                {
                  node: {
                    id: 'MDU6SXNzdWUyOTk5MTU1NjU=',
                    title:
                      'Text formatting tool bar not being displayed when editing a previous forum post',
                    state: 'OPEN',
                    url:
                      'https://github.com/AutarkLabs/autark-network/issues/11',
                    createdAt: '2018-02-24T06:01:02Z',
                    number: 11,
                    repository: {
                      id: 'MDEwOlJlcG9zaXRvcnkxMTYyNzE4MDk=',
                      name: 'autark-network',
                      nameWithOwner: 'autark/autark-network',
                    },
                    milestone: null,
                    labels: {
                      totalCount: 2,
                      edges: [
                        {
                          node: {
                            id: 'MDU6TGFiZWw3OTUwMTI5OTg=',
                            name: 'bug',
                            description: 'Something isn\'t working',
                            color: 'ee0701',
                            url:
                              'https://github.com/AutarkLabs/autark-network/labels/bug',
                          },
                        },
                        {
                          node: {
                            id: 'MDU6TGFiZWw4NzI0Nzg5MzQ=',
                            name: 'points: 8',
                            description: '',
                            color: 'c5def5',
                            url:
                              'https://github.com/AutarkLabs/autark-network/labels/points%3A%208',
                          },
                        },
                      ],
                    },
                  },
                },
              ],
            },
            collaborators: {
              totalCount: 7,
            },
          },
        },
        {
          node: {
            id: 'MDEwOlJlcG9zaXRvcnkxMjYxMDE2NDU=',
            name: 'spaceship-earth',
            description:
              'Discussing our first Earth settlement and solving world challenges.',
            owner: {
              id: 'MDEyOk9yZ2FuaXphdGlvbjM0MDE4MzU5',
              login: 'autark',
            },
            refs: {
              edges: [
                {
                  node: {
                    name: 'master',
                    target: {
                      history: {
                        totalCount: 2,
                      },
                    },
                  },
                },
              ],
            },
            issues: {
              totalCount: 4,
              edges: [
                {
                  node: {
                    id: 'MDU6SXNzdWUzMDcwOTE2MjE=',
                    title:
                      'Cost/benefit analysis of a seastead vs. buying land',
                    state: 'OPEN',
                    url:
                      'https://github.com/AutarkLabs/spaceship-earth/issues/1',
                    createdAt: '2018-03-21T01:08:35Z',
                    number: 1,
                    repository: {
                      id: 'MDEwOlJlcG9zaXRvcnkxMjYxMDE2NDU=',
                      name: 'spaceship-earth',
                      nameWithOwner: 'autark/spaceship-earth',
                    },
                    milestone: null,
                    labels: {
                      totalCount: 1,
                      edges: [
                        {
                          node: {
                            id: 'MDU6TGFiZWw4NzQxNzExNzM=',
                            name: 'points: 34',
                            description: '',
                            color: 'c5def5',
                            url:
                              'https://github.com/AutarkLabs/spaceship-earth/labels/points%3A%2034',
                          },
                        },
                      ],
                    },
                  },
                },
                {
                  node: {
                    id: 'MDU6SXNzdWUzMDcwOTE3NTQ=',
                    title:
                      'Write RFP to source proposals for how we determine location of the first Titanium Shores node',
                    state: 'OPEN',
                    url:
                      'https://github.com/AutarkLabs/spaceship-earth/issues/2',
                    createdAt: '2018-03-21T01:09:32Z',
                    number: 2,
                    repository: {
                      id: 'MDEwOlJlcG9zaXRvcnkxMjYxMDE2NDU=',
                      name: 'spaceship-earth',
                      nameWithOwner: 'autark/spaceship-earth',
                    },
                    milestone: null,
                    labels: {
                      totalCount: 1,
                      edges: [
                        {
                          node: {
                            id: 'MDU6TGFiZWw4NzQxNzI1ODQ=',
                            name: 'points: 13',
                            description: '',
                            color: 'c5def5',
                            url:
                              'https://github.com/AutarkLabs/spaceship-earth/labels/points%3A%2013',
                          },
                        },
                      ],
                    },
                  },
                },
                {
                  node: {
                    id: 'MDU6SXNzdWUzMDcwOTI4Mjk=',
                    title: 'Research 3D printed modular skyscrapers',
                    state: 'OPEN',
                    url:
                      'https://github.com/AutarkLabs/spaceship-earth/issues/3',
                    createdAt: '2018-03-21T01:17:04Z',
                    number: 3,
                    repository: {
                      id: 'MDEwOlJlcG9zaXRvcnkxMjYxMDE2NDU=',
                      name: 'spaceship-earth',
                      nameWithOwner: 'autark/spaceship-earth',
                    },
                    milestone: null,
                    labels: {
                      totalCount: 1,
                      edges: [
                        {
                          node: {
                            id: 'MDU6TGFiZWw4NzQxNzI1ODQ=',
                            name: 'points: 13',
                            description: '',
                            color: 'c5def5',
                            url:
                              'https://github.com/AutarkLabs/spaceship-earth/labels/points%3A%2013',
                          },
                        },
                      ],
                    },
                  },
                },
                {
                  node: {
                    id: 'MDU6SXNzdWUzMDcwOTMwOTY=',
                    title: 'Help create and organize tasks for Spaceship Earth',
                    state: 'OPEN',
                    url:
                      'https://github.com/AutarkLabs/spaceship-earth/issues/4',
                    createdAt: '2018-03-21T01:19:10Z',
                    number: 4,
                    repository: {
                      id: 'MDEwOlJlcG9zaXRvcnkxMjYxMDE2NDU=',
                      name: 'spaceship-earth',
                      nameWithOwner: 'autark/spaceship-earth',
                    },
                    milestone: null,
                    labels: {
                      totalCount: 1,
                      edges: [
                        {
                          node: {
                            id: 'MDU6TGFiZWw4NzQxNzI1ODQ=',
                            name: 'points: 13',
                            description: '',
                            color: 'c5def5',
                            url:
                              'https://github.com/AutarkLabs/spaceship-earth/labels/points%3A%2013',
                          },
                        },
                      ],
                    },
                  },
                },
              ],
            },
            collaborators: {
              totalCount: 6,
            },
          },
        },
        {
          node: {
            id: 'MDEwOlJlcG9zaXRvcnkxMjY4OTkxNDM=',
            name: 'planning-suite',
            description:
              'This repository holds all of the smart contracts and Aragon applications needed to create an aggregate Aragon application for the use of planning and asset distributions for a development team (or more generally any sort of coordinated decentralized work)',
            owner: {
              id: 'MDEyOk9yZ2FuaXphdGlvbjIzNDc1NjQ1',
              login: 'autark',
            },
            refs: {
              edges: [
                {
                  node: {
                    name: '23-implement-canExecute',
                    target: {
                      history: {
                        totalCount: 82,
                      },
                    },
                  },
                },
                {
                  node: {
                    name: '25-execute-vote-internal',
                    target: {
                      history: {
                        totalCount: 64,
                      },
                    },
                  },
                },
                {
                  node: {
                    name: '27-dot_voting_wizard',
                    target: {
                      history: {
                        totalCount: 87,
                      },
                    },
                  },
                },
                {
                  node: {
                    name: '41-payout-engine-outline',
                    target: {
                      history: {
                        totalCount: 72,
                      },
                    },
                  },
                },
                {
                  node: {
                    name: '69-add-totalParticipation',
                    target: {
                      history: {
                        totalCount: 69,
                      },
                    },
                  },
                },
                {
                  node: {
                    name: 'master',
                    target: {
                      history: {
                        totalCount: 71,
                      },
                    },
                  },
                },
                {
                  node: {
                    name: 'revert-50-21-vote-function',
                    target: {
                      history: {
                        totalCount: 67,
                      },
                    },
                  },
                },
              ],
            },
            issues: {
              totalCount: 94,
              edges: [
                {
                  node: {
                    id: 'MDU6SXNzdWUzMDg3NzI4NDc=',
                    title: 'Create instructions for contributors',
                    state: 'CLOSED',
                    url:
                      'https://github.com/AutarkLabs/planning-suite/issues/1',
                    createdAt: '2018-03-26T23:44:36Z',
                    number: 1,
                    repository: {
                      id: 'MDEwOlJlcG9zaXRvcnkxMjY4OTkxNDM=',
                      name: 'planning-suite',
                      nameWithOwner: 'autark/planning-suite',
                    },
                    milestone: null,
                    labels: {
                      totalCount: 0,
                      edges: [],
                    },
                  },
                },
                {
                  node: {
                    id: 'MDU6SXNzdWUzMDg3NzQ3MTM=',
                    title: 'Initialize Planning Suite (dev)',
                    state: 'CLOSED',
                    url:
                      'https://github.com/AutarkLabs/planning-suite/issues/2',
                    createdAt: '2018-03-26T23:55:20Z',
                    number: 2,
                    repository: {
                      id: 'MDEwOlJlcG9zaXRvcnkxMjY4OTkxNDM=',
                      name: 'planning-suite',
                      nameWithOwner: 'autark/planning-suite',
                    },
                    milestone: null,
                    labels: {
                      totalCount: 1,
                      edges: [
                        {
                          node: {
                            id: 'MDU6TGFiZWw4ODA2MDE0NTg=',
                            name: 'epic',
                            description: '',
                            color: 'f9d0c4',
                            url:
                              'https://github.com/AutarkLabs/planning-suite/labels/epic',
                          },
                        },
                      ],
                    },
                  },
                },
                {
                  node: {
                    id: 'MDU6SXNzdWUzMDg3NzQ3NzU=',
                    title: 'Dot Voting - Smart contracts',
                    state: 'OPEN',
                    url:
                      'https://github.com/AutarkLabs/planning-suite/issues/3',
                    createdAt: '2018-03-26T23:55:40Z',
                    number: 3,
                    repository: {
                      id: 'MDEwOlJlcG9zaXRvcnkxMjY4OTkxNDM=',
                      name: 'planning-suite',
                      nameWithOwner: 'autark/planning-suite',
                    },
                    milestone: {
                      id: 'MDk6TWlsZXN0b25lMzI5NDU4Mg==',
                      title: 'Sprint 2 (Milestone 1)',
                      url:
                        'https://github.com/AutarkLabs/planning-suite/milestone/2',
                      description: '',
                    },
                    labels: {
                      totalCount: 0,
                      edges: [],
                    },
                  },
                },
                {
                  node: {
                    id: 'MDU6SXNzdWUzMDg3NzQ4NjU=',
                    title: 'Issue Curation',
                    state: 'OPEN',
                    url:
                      'https://github.com/AutarkLabs/planning-suite/issues/4',
                    createdAt: '2018-03-26T23:56:10Z',
                    number: 4,
                    repository: {
                      id: 'MDEwOlJlcG9zaXRvcnkxMjY4OTkxNDM=',
                      name: 'planning-suite',
                      nameWithOwner: 'autark/planning-suite',
                    },
                    milestone: {
                      id: 'MDk6TWlsZXN0b25lMzM2NzU1MQ==',
                      title: 'Sprint 4 (Milestone 1)',
                      url:
                        'https://github.com/AutarkLabs/planning-suite/milestone/4',
                      description: '',
                    },
                    labels: {
                      totalCount: 1,
                      edges: [
                        {
                          node: {
                            id: 'MDU6TGFiZWw4ODA2MDE0NTg=',
                            name: 'epic',
                            description: '',
                            color: 'f9d0c4',
                            url:
                              'https://github.com/AutarkLabs/planning-suite/labels/epic',
                          },
                        },
                      ],
                    },
                  },
                },
                {
                  node: {
                    id: 'MDU6SXNzdWUzMDg3NzQ4OTg=',
                    title: 'Payout Engine - UI design',
                    state: 'CLOSED',
                    url:
                      'https://github.com/AutarkLabs/planning-suite/issues/5',
                    createdAt: '2018-03-26T23:56:20Z',
                    number: 5,
                    repository: {
                      id: 'MDEwOlJlcG9zaXRvcnkxMjY4OTkxNDM=',
                      name: 'planning-suite',
                      nameWithOwner: 'autark/planning-suite',
                    },
                    milestone: null,
                    labels: {
                      totalCount: 0,
                      edges: [],
                    },
                  },
                },
                {
                  node: {
                    id: 'MDU6SXNzdWUzMDg3NzQ5MjY=',
                    title:
                      'Github Integration (oAuth) - For adding projects/issues',
                    state: 'OPEN',
                    url:
                      'https://github.com/AutarkLabs/planning-suite/issues/6',
                    createdAt: '2018-03-26T23:56:29Z',
                    number: 6,
                    repository: {
                      id: 'MDEwOlJlcG9zaXRvcnkxMjY4OTkxNDM=',
                      name: 'planning-suite',
                      nameWithOwner: 'autark/planning-suite',
                    },
                    milestone: null,
                    labels: {
                      totalCount: 0,
                      edges: [],
                    },
                  },
                },
                {
                  node: {
                    id: 'MDU6SXNzdWUzMDk0NTM4MTE=',
                    title:
                      'Ability to allocate bounties to issues in a bulk-fashion',
                    state: 'OPEN',
                    url:
                      'https://github.com/AutarkLabs/planning-suite/issues/7',
                    createdAt: '2018-03-28T17:09:08Z',
                    number: 7,
                    repository: {
                      id: 'MDEwOlJlcG9zaXRvcnkxMjY4OTkxNDM=',
                      name: 'planning-suite',
                      nameWithOwner: 'autark/planning-suite',
                    },
                    milestone: {
                      id: 'MDk6TWlsZXN0b25lMzM2NzU1MQ==',
                      title: 'Sprint 4 (Milestone 1)',
                      url:
                        'https://github.com/AutarkLabs/planning-suite/milestone/4',
                      description: '',
                    },
                    labels: {
                      totalCount: 1,
                      edges: [
                        {
                          node: {
                            id: 'MDU6TGFiZWw4ODA2MDE0NTg=',
                            name: 'epic',
                            description: '',
                            color: 'f9d0c4',
                            url:
                              'https://github.com/AutarkLabs/planning-suite/labels/epic',
                          },
                        },
                      ],
                    },
                  },
                },
                {
                  node: {
                    id: 'MDU6SXNzdWUzMDk0NjI3NTM=',
                    title:
                      'Document development strategy for Status Open Bounty integration',
                    state: 'CLOSED',
                    url:
                      'https://github.com/AutarkLabs/planning-suite/issues/8',
                    createdAt: '2018-03-28T17:37:06Z',
                    number: 8,
                    repository: {
                      id: 'MDEwOlJlcG9zaXRvcnkxMjY4OTkxNDM=',
                      name: 'planning-suite',
                      nameWithOwner: 'autark/planning-suite',
                    },
                    milestone: null,
                    labels: {
                      totalCount: 2,
                      edges: [
                        {
                          node: {
                            id: 'MDU6TGFiZWw4OTMxOTYwMDU=',
                            name: 'Needs Poker',
                            description:
                              'This issue needs to go through planning poker',
                            color: 'e5da75',
                            url:
                              'https://github.com/AutarkLabs/planning-suite/labels/Needs%20Poker',
                          },
                        },
                        {
                          node: {
                            id: 'MDU6TGFiZWw5MTI1MzcwMDI=',
                            name: 'R&D',
                            description:
                              'This issue requires research and design work',
                            color: 'b68bdd',
                            url:
                              'https://github.com/AutarkLabs/planning-suite/labels/R%26D',
                          },
                        },
                      ],
                    },
                  },
                },
                {
                  node: {
                    id: 'MDU6SXNzdWUzMTAxOTY2NDE=',
                    title: 'Design UML for dot voting smart contracts',
                    state: 'OPEN',
                    url:
                      'https://github.com/AutarkLabs/planning-suite/issues/9',
                    createdAt: '2018-03-31T00:19:12Z',
                    number: 9,
                    repository: {
                      id: 'MDEwOlJlcG9zaXRvcnkxMjY4OTkxNDM=',
                      name: 'planning-suite',
                      nameWithOwner: 'autark/planning-suite',
                    },
                    milestone: null,
                    labels: {
                      totalCount: 0,
                      edges: [],
                    },
                  },
                },
                {
                  node: {
                    id: 'MDU6SXNzdWUzMTAxOTgyMDg=',
                    title:
                      'Dot Voting comments, variables, and function signatures',
                    state: 'CLOSED',
                    url:
                      'https://github.com/AutarkLabs/planning-suite/issues/10',
                    createdAt: '2018-03-31T00:37:29Z',
                    number: 10,
                    repository: {
                      id: 'MDEwOlJlcG9zaXRvcnkxMjY4OTkxNDM=',
                      name: 'planning-suite',
                      nameWithOwner: 'autark/planning-suite',
                    },
                    milestone: null,
                    labels: {
                      totalCount: 0,
                      edges: [],
                    },
                  },
                },
              ],
            },
            collaborators: {
              totalCount: 20,
            },
          },
        },
      ],
    },
  },
}

function projectsMockData() {
  return processRepos(savedRepos)
}

function processRepos(data) {
  var reposFromServer = {}

  data['user'].repositories.edges.forEach(rNode => {
    var commits = 0
    rNode.node.refs.edges.forEach(refNode => {
      commits += refNode.node.target.history.totalCount
    })

    const labels = {}
    const milestones = {}

    rNode.node.issues.edges.forEach(issue => {
      if (issue.node.labels.totalCount > 0) {
        issue.node.labels.edges.forEach(label => {
          labels[label.node.id] = label.node
        })
      }
      if (issue.node.milestone) {
        milestones[issue.node.milestone.id] = issue.node.milestone
      }
    })
    reposFromServer[rNode.node.id] = {
      name: rNode.node.name,
      description: rNode.node.description,
      collaborators: rNode.node.collaborators.totalCount,
      commits: commits,
      ownerLogin: rNode.node.owner.login,
      issues: rNode.node.issues.edges,
      labels: labels,
      milestones: milestones,
    }
    return
  })
  return reposFromServer
}

export default { projectsMockData }
