GitHub asynchronously initializes default repository metadata such as labels after the creation API call completes
It also handles creating an authenticated Octokit for you with octokit-from-auth.
Why Polling?
At time of writing, GitHub does not provide an API to determine whether a repository's asynchronous initialization is complete.
Most noticeably, repository labels aren't created immediately, or even all at once.
Labels are added in over several seconds after a repository is created.
Organization repositories may change default labels -including during repository creation- so it is not enough to check whether the number of repository labels matches an expected number.
The only known way to determine whether labels have finished being populated seems to be to check whether they've stopped being added over multiple API calls.
After creating a repository, newGitHubRepository continuously polls the repository labels API up to an arbitrary 35 times.
It waits until the number of labels is the same non-zero number three times in a row.