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 ebf953c

Browse filesBrowse files
committed
Massaging the pull request.
- GHPerson really should be an abstract class - static listPullRequests method does not fit the design of this library, although I'm very sympathetic as to why Luca wanted to do it. Nonetheless I'm removing this in favor of the lazy loading of the state to avoid unnecessary calls in the future.
1 parent 19ec332 commit ebf953c
Copy full SHA for ebf953c

File tree

Expand file treeCollapse file tree

2 files changed

+2
-14
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-14
lines changed

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHPerson.java
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
* @author Kohsuke Kawaguchi
1616
*/
17-
public class GHPerson {
17+
public abstract class GHPerson {
1818
/*package almost final*/ GitHub root;
1919

2020
// core data fields that exist even for "small" user data (such as the user info in pull request)
@@ -235,5 +235,4 @@ public int getFollowersCount() throws IOException {
235235
populate();
236236
return followers;
237237
}
238-
239238
}

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHRepository.java
+1-12Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public class GHRepository {
5757
private String description, homepage, name;
5858
private String url; // this is the API url
5959
private String html_url; // this is the UI
60-
private GHPerson owner; // not fully populated. beware.
60+
private GHUser owner; // not fully populated. beware.
6161
private boolean has_issues, has_wiki, fork, _private, has_downloads;
6262
private int watchers,forks,open_issues,size;
6363
private String created_at, pushed_at;
@@ -378,17 +378,6 @@ protected void wrapUp(GHPullRequest[] page) {
378378
};
379379
}
380380

381-
/**
382-
* Retrieves all the pull requests of a particular state by knowing organisation and repository
383-
*/
384-
public static PagedIterable<GHPullRequest> listPullRequests(final GitHub root, final GHPerson owner, final String repositoryName, final GHIssueState state) {
385-
GHRepository repo = new GHRepository();
386-
repo.root = root;
387-
repo.name = repositoryName;
388-
repo.owner = owner;
389-
return repo.listPullRequests(state);
390-
}
391-
392381
/**
393382
* Retrieves the currently configured hooks.
394383
*/

0 commit comments

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