Skip to content

Commit 7e600c4

Browse files
committed
Var-args instead of list
1 parent 0f32783 commit 7e600c4

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

src/main/java/org/kohsuke/github/GHTeamBuilder.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package org.kohsuke.github;
22

33
import java.io.IOException;
4-
import java.util.List;
54

65
/**
76
* Creates a team.
@@ -40,19 +39,19 @@ public GHTeamBuilder description(String description) {
4039
* maintainers of team
4140
* @return a builder to continue with building
4241
*/
43-
public GHTeamBuilder maintainers(List<String> maintainers) {
42+
public GHTeamBuilder maintainers(String... maintainers) {
4443
this.builder.with("maintainers", maintainers);
4544
return this;
4645
}
4746

4847
/**
49-
* Repo names to add this team to.
48+
* Repository names to add this team to.
5049
*
5150
* @param repoNames
5251
* repoNames to add team to
5352
* @return a builder to continue with building
5453
*/
55-
public GHTeamBuilder repoNames(List<String> repoNames) {
54+
public GHTeamBuilder repositories(String... repoNames) {
5655
this.builder.with("repo_names", repoNames);
5756
return this;
5857
}

src/test/java/org/kohsuke/github/GHOrganizationTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
import java.io.IOException;
1010

11-
import static java.util.Collections.singletonList;
12-
1311
public class GHOrganizationTest extends AbstractGitHubWireMockTest {
1412

1513
public static final String GITHUB_API_TEST = "github-api-test";
@@ -120,8 +118,8 @@ public void testCreateAllArgsTeam() throws IOException {
120118

121119
GHTeam team = org.createTeam(TEAM_NAME_CREATE)
122120
.description("Team description")
123-
.maintainers(singletonList("bitwiseman"))
124-
.repoNames(singletonList(REPO_NAME))
121+
.maintainers("bitwiseman")
122+
.repositories(REPO_NAME)
125123
.privacy(GHTeam.Privacy.CLOSED)
126124
.parentTeamId(3617900)
127125
.create();

0 commit comments

Comments
 (0)