Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 43075fa

Browse filesBrowse files
committed
By convention we use "listXyz" method names
1 parent 35ba267 commit 43075fa
Copy full SHA for 43075fa

File tree

Expand file treeCollapse file tree

2 files changed

+4
-5
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-5
lines changed

‎src/main/java/org/kohsuke/github/GitHub.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GitHub.java
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
import java.util.Date;
4949
import java.util.HashMap;
5050
import java.util.HashSet;
51-
import java.util.Hashtable;
5251
import java.util.List;
5352
import java.util.Map;
5453
import java.util.Set;
@@ -439,16 +438,16 @@ public GHOrganization getOrganization(String name) throws IOException {
439438
/**
440439
* Gets a list of all organizations.
441440
*/
442-
public PagedIterable<GHOrganization> getOrganizations() {
443-
return getOrganizations(null);
441+
public PagedIterable<GHOrganization> listOrganizations() {
442+
return listOrganizations(null);
444443
}
445444

446445
/**
447446
* Gets a list of all organizations starting after the organization identifier specified by 'since'.
448447
*
449448
* @see <a href="https://developer.github.com/v3/orgs/#parameters">List All Orgs - Parameters</a>
450449
*/
451-
public PagedIterable<GHOrganization> getOrganizations(final String since) {
450+
public PagedIterable<GHOrganization> listOrganizations(final String since) {
452451
return new PagedIterable<GHOrganization>() {
453452
@Override
454453
public PagedIterator<GHOrganization> _iterator(int pageSize) {

‎src/test/java/org/kohsuke/github/GitHubTest.java

Copy file name to clipboardExpand all lines: src/test/java/org/kohsuke/github/GitHubTest.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public void getOrgs() throws IOException {
164164
GitHub hub = GitHub.connect();
165165
int iterations = 10;
166166
Set<Long> orgIds = new HashSet<Long>();
167-
for (GHOrganization org : Iterables.limit(hub.getOrganizations().withPageSize(2), iterations)) {
167+
for (GHOrganization org : Iterables.limit(hub.listOrganizations().withPageSize(2), iterations)) {
168168
orgIds.add(org.getId());
169169
System.out.println(org.getName());
170170
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.