I've added an octokitScope to the options, and used that in the sync and async providers to set the scope of the OctoKit provider. This way users can configure the OctokitModule to create request scoped Octokit instances, which fixes #2 .
I noticed that the options, including auth did not renew when creating new Octokit instances, so I create a copy and call auth if it is a function, to renew it. Perhaps this isn't the optimal solution, but I didn't understand the architecture sufficiently to come up with something better.
I've added an
octokitScope
to the options, and used that in the sync and async providers to set thescope
of the OctoKit provider. This way users can configure theOctokitModule
to create request scoped Octokit instances, which fixes #2 .I noticed that the
options
, includingauth
did not renew when creating new Octokit instances, so I create a copy and callauth
if it is a function, to renew it. Perhaps this isn't the optimal solution, but I didn't understand the architecture sufficiently to come up with something better.