Uh oh!
There was an error while loading. Please reload this page.
Add support for personal access tokens request review API - #2827
Conversation
Codecov Report
@@ Coverage Diff @@## master #2827 +/- ##
=======================================
Coverage 98.06% 98.06% =======================================
Files 136 137 +1 Lines 12279 12287 +8 =======================================
+ Hits 12041 12049 +8
Misses 162 162 Partials 76 76
|
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @joaopenteado !
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com>
joaopenteado
commented
Jul 5, 2023
@gmlewis thanks again for the quick feedback! I'll probably commit the requested changes by tomorrow.
This makes perfect sense. I should've thought of that, thanks for the heads up! Just two questions though, as I am still not very familiar with this package's approach to API design. I saw a lot of other methods using pointers to the Additionally, the In order words, despite typeReviewPersonalAccessTokenRequestOptionsstruct {
Action*string`json:"action,omitempty"`Reason*string`json:"reason,omitempty"`
}And not like this: typeReviewPersonalAccessTokenRequestOptionsstruct {
Actionstring`json:"action"`Reason*string`json:"reason,omitempty"`// or string
}Is my understanding of the above points, correct? |
So you will probably see inconsistencies in this regard within this client library, which I will take the blame for.
Again, ideally, if a passed parameter is mandatory, we would not use a pointer, and we would not use So it appears to me that your last suggestion would be preferred since typeReviewPersonalAccessTokenRequestOptionsstruct {
Actionstring`json:"action"`Reason*string`json:"reason,omitempty"`
} |
gmlewis
commented
Jul 5, 2023
In case the last comment wasn't clear, I would think this method would have this in it: (in other words, not a pointer to a struct, but instead using pass-by-value.) |
@gmlewis Thank you for clarifying! Additionally, I've made the parameter |
gmlewis
commented
Jul 6, 2023
Since the official docs say that it is an "integer", then let's please make it an |
gmlewis
commented
Jul 6, 2023
Oh, and you can leave all the "%v" in the |
joaopenteado
commented
Jul 7, 2023
Done! |
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @joaopenteado !
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.
gmlewis
commented
Jul 10, 2023
Thank you, @liaodaniel ! |
Following up with my previous PR #2826, I am also proposing the following changes, which add support for programmatically approving or denying fine-grained personal access token requests.
I thought about including the rest of this API, but I don't have an immediate need for it and the PR might get a little too big. I was also a bit unsure on the function signature, so let me know your thoughts.