Skip to content

Commit be8cf60

Browse files
authored
Merge pull request #25 from cortexapps/ef/respect-client-url-gh-person
Respect client url gh person
2 parents b6920ef + 4416517 commit be8cf60

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<modelVersion>4.0.0</modelVersion>
33
<groupId>org.kohsuke</groupId>
44
<artifactId>cortexapps-github-api</artifactId>
5-
<version>1.320</version>
5+
<version>1.321</version>
66
<name>GitHub API for Java</name>
77
<url>https://github-api.kohsuke.org/</url>
88
<description>GitHub API for Java</description>

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,18 @@ protected synchronized void populate() throws IOException {
5555
if (isOffline()) {
5656
return; // cannot populate, will have to live with what we have
5757
}
58-
URL url = getUrl();
58+
String path = getUrlPath();
59+
if (path != null) {
60+
root().createRequest().withUrlPath(path).fetchInto(this);
61+
}
62+
}
63+
64+
private String getUrlPath() {
65+
URL url = getUrl(); // Get the full URL
5966
if (url != null) {
60-
root().createRequest().setRawUrlPath(url.toString()).fetchInto(this);
67+
return url.getPath(); // Extract only the relative path
6168
}
69+
return null;
6270
}
6371

6472
/**

0 commit comments

Comments
 (0)