Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update src/main/java/org/kohsuke/github/GHRepository.java
Browse files Browse the repository at this point in the history
Committing @bitwiseman suggestion

Co-authored-by: Liam Newman <[email protected]>
augustd and bitwiseman authored Nov 13, 2024
1 parent 560779a commit 63e43d7
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/main/java/org/kohsuke/github/GHRepository.java
Original file line number Diff line number Diff line change
@@ -2736,14 +2736,11 @@ public PagedIterable<Contributor> listContributors() throws IOException {
* the io exception
* @link https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#list-repository-contributors
*/
public PagedIterable<Contributor> listContributors(boolean includeAnonymous) throws IOException {
if (includeAnonymous) {
return root().createRequest()
.withUrlPath(getApiTailUrl("contributors"))
.with("anon", "true")
.toIterable(Contributor[].class, null);
}
return listContributors();
public PagedIterable<Contributor> listContributors(Boolean includeAnonymous) throws IOException {
return root().createRequest()
.withUrlPath(getApiTailUrl("contributors"))
.with("anon", includeAnonymous)
.toIterable(Contributor[].class, null);
}

/**

0 comments on commit 63e43d7

Please sign in to comment.