Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 586db99

Browse filesBrowse files
authored
Merge branch 'master' into fix-wiremock-status-test
2 parents c5d3a7d + 5377d0d commit 586db99
Copy full SHA for 586db99

File tree

Expand file treeCollapse file tree

2 files changed

+1
-23
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+1
-23
lines changed

‎src/main/java/org/kohsuke/github/GHIssue.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHIssue.java
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,8 @@ public GHIssueState getState() {
158158
* Gets labels.
159159
*
160160
* @return the labels
161-
* @throws IOException
162-
* the io exception
163161
*/
164-
public Collection<GHLabel> getLabels() throws IOException {
162+
public Collection<GHLabel> getLabels() {
165163
if (labels == null) {
166164
return Collections.emptyList();
167165
}

‎src/main/java/org/kohsuke/github/GHPullRequest.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHPullRequest.java
-20Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import java.net.URL;
3030
import java.util.ArrayList;
3131
import java.util.Arrays;
32-
import java.util.Collection;
3332
import java.util.Collections;
3433
import java.util.Date;
3534
import java.util.List;
@@ -73,13 +72,6 @@ public class GHPullRequest extends GHIssue implements Refreshable {
7372
private GHUser[] requested_reviewers;
7473
private GHTeam[] requested_teams;
7574

76-
/**
77-
* GitHub doesn't return some properties of {@link GHIssue} when requesting the GET on the 'pulls' API route as
78-
* opposed to 'issues' API route. This flag remembers whether we made the GET call on the 'issues' route on this
79-
* object to fill in those missing details
80-
*/
81-
private transient boolean fetchedIssueDetails;
82-
8375
GHPullRequest wrapUp(GHRepository owner) {
8476
this.wrap(owner);
8577
return wrapUp(owner.root);
@@ -178,12 +170,6 @@ public Date getMergedAt() {
178170
return GitHubClient.parseDate(merged_at);
179171
}
180172

181-
@Override
182-
public Collection<GHLabel> getLabels() throws IOException {
183-
fetchIssue();
184-
return super.getLabels();
185-
}
186-
187173
@Override
188174
public GHUser getClosedBy() {
189175
return null;
@@ -662,10 +648,4 @@ public enum MergeMethod {
662648
MERGE, SQUASH, REBASE
663649
}
664650

665-
private void fetchIssue() throws IOException {
666-
if (!fetchedIssueDetails) {
667-
root.createRequest().withUrlPath(getIssuesApiRoute()).fetchInto(this);
668-
fetchedIssueDetails = true;
669-
}
670-
}
671651
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.