From 63e43d762f19fd4df5c63ae960819310d561d548 Mon Sep 17 00:00:00 2001 From: August Detlefsen Date: Wed, 13 Nov 2024 15:24:32 -0800 Subject: [PATCH] Update src/main/java/org/kohsuke/github/GHRepository.java Committing @bitwiseman suggestion Co-authored-by: Liam Newman --- src/main/java/org/kohsuke/github/GHRepository.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/kohsuke/github/GHRepository.java b/src/main/java/org/kohsuke/github/GHRepository.java index ccaca4c7c1..c5dd9b9854 100644 --- a/src/main/java/org/kohsuke/github/GHRepository.java +++ b/src/main/java/org/kohsuke/github/GHRepository.java @@ -2736,14 +2736,11 @@ public PagedIterable listContributors() throws IOException { * the io exception * @link https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#list-repository-contributors */ - public PagedIterable listContributors(boolean includeAnonymous) throws IOException { - if (includeAnonymous) { - return root().createRequest() - .withUrlPath(getApiTailUrl("contributors")) - .with("anon", "true") - .toIterable(Contributor[].class, null); - } - return listContributors(); + public PagedIterable listContributors(Boolean includeAnonymous) throws IOException { + return root().createRequest() + .withUrlPath(getApiTailUrl("contributors")) + .with("anon", includeAnonymous) + .toIterable(Contributor[].class, null); } /**