From 2f0dd3b37810453a6164426f6c625d832e8ad587 Mon Sep 17 00:00:00 2001 From: Liam Newman Date: Fri, 29 Aug 2025 08:00:31 -0700 Subject: [PATCH] Deprecate GHRepository#getIssues() GHRepository#getIssues() has poor performance for large response sets and works against the best usage patterns. Deprecated in favor of #queryIssues(). Closes #2128 --- src/main/java/org/kohsuke/github/GHRepository.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/org/kohsuke/github/GHRepository.java b/src/main/java/org/kohsuke/github/GHRepository.java index 547a663ad8..1ecd86f0bd 100644 --- a/src/main/java/org/kohsuke/github/GHRepository.java +++ b/src/main/java/org/kohsuke/github/GHRepository.java @@ -1603,7 +1603,9 @@ public GHIssueEvent getIssueEvent(long id) throws IOException { * @return the issues * @throws IOException * the io exception + * @deprecated Use {@link #queryIssues()} instead. */ + @Deprecated public List getIssues(GHIssueState state) throws IOException { return queryIssues().state(state).list().toList(); } @@ -1618,7 +1620,9 @@ public List getIssues(GHIssueState state) throws IOException { * @return the issues * @throws IOException * the io exception + * @deprecated Use {@link #queryIssues()} instead. */ + @Deprecated public List getIssues(GHIssueState state, GHMilestone milestone) throws IOException { return queryIssues().milestone(milestone == null ? "none" : "" + milestone.getNumber()) .state(state)