From 89770b922d89898ae8016188832a762ca2ef0d12 Mon Sep 17 00:00:00 2001 From: Liam Newman Date: Sun, 29 Sep 2019 18:33:08 -0700 Subject: [PATCH] Change listKeys to getKeys --- src/main/java/org/kohsuke/github/GHUser.java | 4 ++-- src/test/java/org/kohsuke/github/UserTest.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/kohsuke/github/GHUser.java b/src/main/java/org/kohsuke/github/GHUser.java index fbc64d911e..cd365b82bd 100644 --- a/src/main/java/org/kohsuke/github/GHUser.java +++ b/src/main/java/org/kohsuke/github/GHUser.java @@ -35,8 +35,8 @@ */ public class GHUser extends GHPerson { - public List listKeys() throws IOException { - return Collections.unmodifiableList(Arrays.asList(root.retrieve().to("/users/"+login+"/keys", GHKey[].class))); + public List getKeys() throws IOException { + return Collections.unmodifiableList(Arrays.asList(root.retrieve().to(getApiTailUrl("keys"), GHKey[].class))); } /** diff --git a/src/test/java/org/kohsuke/github/UserTest.java b/src/test/java/org/kohsuke/github/UserTest.java index cf273b3531..e4376c7897 100644 --- a/src/test/java/org/kohsuke/github/UserTest.java +++ b/src/test/java/org/kohsuke/github/UserTest.java @@ -30,7 +30,7 @@ private Set count30(PagedIterable l) { @Test public void getKeys() throws IOException { GHUser u = gitHub.getUser("rtyler"); - List ghKeys = new ArrayList<>(u.listKeys()); + List ghKeys = new ArrayList<>(u.getKeys()); assertEquals(3, ghKeys.size()); Collections.sort(ghKeys, new Comparator() {