Skip to content

Commit 4be498e

Browse files
authored
Merge pull request #2207 from Haarolean/fix-copilot-user
Fix `getUser()` 404 for bot users in PR reviews
2 parents 9152b37 + 4fe5610 commit 4be498e

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,7 @@ public Instant getSubmittedAt() {
165165
* the io exception
166166
*/
167167
public GHUser getUser() throws IOException {
168-
if (user != null) {
169-
return owner.root().getUser(user.getLogin());
170-
}
171-
return null;
168+
return owner.root().intern(user);
172169
}
173170

174171
/**

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ public Side getStartSide() {
352352
* the io exception
353353
*/
354354
public GHUser getUser() throws IOException {
355-
return owner.root().getUser(user.getLogin());
355+
return owner.root().intern(user);
356356
}
357357

358358
/**

0 commit comments

Comments
 (0)