public function fetchRepository(Repository $repository)
    {
        $response = $this->getResponse(
            sprintf('%s/%s/metrics',
                $repository->getType(),
                $repository->getSlug()
            )
        );

        if (!$response || isset($repositoryArray['error'])) {
            throw new \UnexpectedValueException(sprintf('Response is empty for url %s', $response));
        }

        $repository = $this->hydrate($repository, $response['values']);
        $repository->setBranch($response['branch']);


        return $repository;
    }