feat: Add ListFineGrainedPersonalAccessTokenRequests for org#4022
feat: Add ListFineGrainedPersonalAccessTokenRequests for org#4022AbhishekAg wants to merge 8 commits intogoogle:masterfrom
ListFineGrainedPersonalAccessTokenRequests for org#4022Conversation
…sting Signed-off-by: abhishek <abhishek@exaforce.com>
ListFineGrainedPersonalAccessTokenRequests for org PAT request listing
ListFineGrainedPersonalAccessTokenRequests for org PAT request listingListFineGrainedPersonalAccessTokenRequests for org
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4022 +/- ##
==========================================
+ Coverage 94.07% 94.09% +0.02%
==========================================
Files 207 207
Lines 19163 19203 +40
==========================================
+ Hits 18028 18070 +42
+ Misses 936 935 -1
+ Partials 199 198 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: abhishek <abhishek@exaforce.com>
|
@gmlewis Can you please re-run the pipeline? linter error is due to 503 |
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @AbhishekAg!
Once you add omitempty to the pointer fields in FineGrainedPersonalAccessTokenRequests then I think we should be ready for a second LGTM+Approval from any other contributor to this repo before merging.
cc: @stevehipwell - @alexandear - @zyfy29 - @Not-Dhananjay-Mishra
Signed-off-by: abhishek <abhishek@exaforce.com>
Done. |
Signed-off-by: abhishek <abhishek@exaforce.com>
stevehipwell
left a comment
There was a problem hiding this comment.
I may be missing something but to me the struct pattern doesn't look right/consistent?
|
Pipeline failure due to |
Unfortunately, we appear to be having some flaky tests, which @alexandear also noticed and filed an issue: #3987. I'm not sure at what point this started getting flaky, but it feels like it is pretty recent. I reran the failed job. |
alexandear
left a comment
There was a problem hiding this comment.
By the way, did you check ListFineGrainedPersonalAccessTokenRequests by calling it on a real organization instead of using mocked data?
Yes, and over the last 10+ years, we've seen that a fair amount... mostly in the early days (hence the stance in our README.md). OK, so your argument is that now that GitHub IS providing response schemas, and we are building a new endpoint based upon that schema, that we should initially attempt to honor it and fix bugs as they occur. I totally understand that argument. As a maintainer, we wish that everything could be 100% consistent and cut-and-dry and make perfect sense. So my next thought is... now that GitHub response schemas are prolific, do we now go back and clean up every struct this repo generates for GitHub resources and make the fields match the schemas?!? Are we opening up an enormous can of worms? Thoughts? |
We can do this in the future, but we need to make sure it won't break anything. So we should limit these changes to endpoints that have integration tests. Or maybe we need to add more integration tests, but it's hard for some endpoints (e.g., enterprise or org-related). |
|
OK, @AbhishekAg, let's run with the recommendations from @stevehipwell and @alexandear. |
Signed-off-by: abhishek <abhishek@exaforce.com>
|
I completed all the requested changes. |
Signed-off-by: abhishek <abhishek@exaforce.com>
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @AbhishekAg and @stevehipwell!
I'm good with these changes.
LGTM.
@alexandear - have all your concerns been addressed before I merge?
|
@gmlewis can we please merge these changes if no more comments? All reviewers have approved the changes. |
Implement support for listing requests to access organization resources via fine-grained personal access tokens (GET /orgs/{org}/personal-access-token-requests).
(id, reason, owner, repository selection, permissions, timestamps, token info)
ListFineGrainedPATOptions (sort, direction, owner, repository, permission, last_used_before/after, pagination)
API docs: https://docs.github.com/en/rest/orgs/personal-access-tokens#list-requests-to-access-organization-resources-with-fine-grained-personal-access-tokens
Fixes: #4021