-
Notifications
You must be signed in to change notification settings - Fork 775
Expand file tree
/
Copy pathGHAuthenticatedAppInstallation.java
More file actions
43 lines (36 loc) · 1.25 KB
/
GHAuthenticatedAppInstallation.java
File metadata and controls
43 lines (36 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package org.kohsuke.github;
import javax.annotation.Nonnull;
// TODO: Auto-generated Javadoc
/**
* The Github App Installation corresponding to the installation token used in a client.
*
* @see GitHub#getInstallation() GitHub#getAuthenticatedAppInstallation()
*/
public class GHAuthenticatedAppInstallation extends GitHubInteractiveObject {
private static class GHAuthenticatedAppInstallationRepositoryResult extends SearchResult<GHRepository> {
private GHRepository[] repositories;
@Override
GHRepository[] getItems(GitHub root) {
return repositories;
}
}
/**
* Instantiates a new GH authenticated app installation.
*
* @param root
* the root
*/
protected GHAuthenticatedAppInstallation(@Nonnull GitHub root) {
super(root);
}
/**
* List repositories that this app installation can access.
*
* @return the paged iterable
*/
public PagedSearchIterable<GHRepository> listRepositories() {
return new PagedSearchIterable<>(root().createRequest()
.withUrlPath("/installation/repositories")
.toPaginatedEndpoint(GHAuthenticatedAppInstallationRepositoryResult.class, GHRepository.class, null));
}
}