improved code for handling the creation of the octokit client