Skip to content

Conversation

@t0m4uk1991
Copy link
Contributor

Description

Add getAppInstallations (under the hood call on /user/installations) method in GHMyself

For more info pls take a look at https://docs.github.com/en/rest/reference/apps#list-app-installations-accessible-to-the-user-access-token

@codecov
Copy link

codecov bot commented Jun 21, 2021

Codecov Report

Merging #1187 (689b2f7) into main (81f23e8) will increase coverage by 0.02%.
The diff coverage is 83.33%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1187      +/-   ##
============================================
+ Coverage     73.82%   73.85%   +0.02%     
- Complexity     1856     1862       +6     
============================================
  Files           186      188       +2     
  Lines          6163     6181      +18     
  Branches        367      368       +1     
============================================
+ Hits           4550     4565      +15     
- Misses         1392     1395       +3     
  Partials        221      221              
Impacted Files Coverage Δ
...ava/org/kohsuke/github/GHAppInstallationsPage.java 66.66% <66.66%> (ø)
...org/kohsuke/github/GHAppInstallationsIterable.java 85.71% <85.71%> (ø)
src/main/java/org/kohsuke/github/GHMyself.java 39.21% <100.00%> (+1.21%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 81f23e8...689b2f7. Read the comment docs.

Copy link
Member

@bitwiseman bitwiseman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@t0m4uk1991
Thanks for your continued contributions!

You've tested this for 1 installation and it works fine, but ...

This is actually a paged response. Similar to search and a number of other endpoints
https://docs.github.com/en/rest/reference/apps#list-app-installations-accessible-to-the-user-access-token--parameters
😭

You'll need to implement this using a class extending PagedIterable in about the same way https://github.com/hub4j/github-api/blob/main/src/main/java/org/kohsuke/github/PagedSearchIterable.java does.

@t0m4uk1991 t0m4uk1991 force-pushed the myself_app_installations branch from 93343a4 to 81ac480 Compare June 22, 2021 17:09
@t0m4uk1991
Copy link
Contributor Author

t0m4uk1991 commented Jun 22, 2021

Hi @bitwiseman

Thanks for quick feedback.
I updated PR, could you please take a look again?

Thanks

@bitwiseman bitwiseman merged commit ebdbf8f into hub4j:main Jun 22, 2021
@t0m4uk1991 t0m4uk1991 deleted the myself_app_installations branch July 23, 2021 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants