Skip to content

Commit 89770b9

Browse files
committed
Change listKeys to getKeys
1 parent 55f9c40 commit 89770b9

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
*/
3636
public class GHUser extends GHPerson {
3737

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

4242
/**

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ private Set<GHUser> count30(PagedIterable<GHUser> l) {
3030
@Test
3131
public void getKeys() throws IOException {
3232
GHUser u = gitHub.getUser("rtyler");
33-
List<GHKey> ghKeys = new ArrayList<>(u.listKeys());
33+
List<GHKey> ghKeys = new ArrayList<>(u.getKeys());
3434

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

0 commit comments

Comments
 (0)