overnested / nestjs-octokit

Octokit module for NestJS
MIT License
12 stars 4 forks source link

Added `octokitScope` to define scope of octokit instance. #3

Closed Helveg closed 2 years ago

Helveg commented 2 years ago

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.

alitnk commented 2 years ago

I published a new version with the changes you made (v0.2.0)