Add support for creating scoped installation tokens#1182
Add support for creating scoped installation tokens#1182tarebyte wants to merge 2 commits intogoogle:masterfrom tarebyte:scoped-installation-tokens
Conversation
See https://developer.github.com/v3/apps/#create-a-new-installation-token This creates a new function `CreateScopedInstallationToken`, which allows the caller to limit an installation's access to a subset of repositories and permissions.
Codecov Report
@@ Coverage Diff @@
## master #1182 +/- ##
==========================================
- Coverage 70.25% 70.24% -0.02%
==========================================
Files 84 84
Lines 5867 5878 +11
==========================================
+ Hits 4122 4129 +7
- Misses 956 958 +2
- Partials 789 791 +2
Continue to review full report at Codecov.
|
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @tarebyte!
We try to keep the surface area of the API as small as possible (to make maintenance easier, to make it easier for the user to find a function they need, and to keep the auto-generated godocs as small as possible), and prefer to break the API and bump the major version number.
I would like to request that you add the new parameter to the existing endpoint above it, but before you make this non-trivial change, let's see if @gauntface agrees with me or if he prefers to keep it separate like you've made it.
Otherwise, LGTM.
|
friendly ping @gauntface |
|
I would agree with @gmlewis that moving to a single struct would make this more consistent with the rest of the API. Otherwise, this change is LGTM from me |
See https://developer.github.com/v3/apps/#create-a-new-installation-token
This creates a new function
CreateScopedInstallationToken, which allows the caller to limit an installation's access to a subset of repositories and permissions.These parameters are optional which is why I opted to created a new function for this.
✨ Feedback appreciated ✨