Reduce complexity of GithubService, fix occasional test failure