Skip to content

Commit

Permalink
Change listKeys to getKeys
Browse files Browse the repository at this point in the history
  • Loading branch information
bitwiseman committed Sep 30, 2019
1 parent 55f9c40 commit 89770b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/kohsuke/github/GHUser.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
*/
public class GHUser extends GHPerson {

public List<GHKey> listKeys() throws IOException {
return Collections.unmodifiableList(Arrays.asList(root.retrieve().to("/users/"+login+"/keys", GHKey[].class)));
public List<GHKey> getKeys() throws IOException {
return Collections.unmodifiableList(Arrays.asList(root.retrieve().to(getApiTailUrl("keys"), GHKey[].class)));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/kohsuke/github/UserTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ private Set<GHUser> count30(PagedIterable<GHUser> l) {
@Test
public void getKeys() throws IOException {
GHUser u = gitHub.getUser("rtyler");
List<GHKey> ghKeys = new ArrayList<>(u.listKeys());
List<GHKey> ghKeys = new ArrayList<>(u.getKeys());

assertEquals(3, ghKeys.size());
Collections.sort(ghKeys, new Comparator<GHKey>() {
Expand Down

0 comments on commit 89770b9

Please sign in to comment.