Skip to content

Commit

Permalink
Fix CI failures
Browse files Browse the repository at this point in the history
  • Loading branch information
bitwiseman committed Nov 28, 2023
1 parent 6f5b3f4 commit 5a453e0
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 31 deletions.
4 changes: 3 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,11 @@

<!-- V2.x changes -->
<exclude>org.kohsuke.github.connector.GitHubConnectorResponseHttpUrlConnectionAdapter</exclude>
<exclude>oorg.kohsuke.github.GHPerson.*</exclude>
<exclude>org.kohsuke.github.GHRepositorySearchBuilder.Fork</exclude>

<!-- Deprecated -->
<exclude>org.kohsuke.github.GHPerson.1</exclude>

<!-- Sample only -->
<exclude>org.kohsuke.github.example.*</exclude>

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/kohsuke/github/GHAppInstallation.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public String getRepositoriesUrl() {
* @return the paged iterable
* @deprecated This method cannot work on a {@link GHAppInstallation} retrieved from
* {@link GHApp#listInstallations()} (for example), except when resorting to unsupported hacks involving
* {@link GHAppInstallation#setRoot(GitHub)} to switch from an application client to an installation
* setRoot(GitHub) to switch from an application client to an installation
* client. This method will be removed. You should instead use an installation client (with an
* installation token, not a JWT), retrieve a {@link GHAuthenticatedAppInstallation} from
* {@link GitHub#getInstallation()}, then call
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/org/kohsuke/github/GHDeploymentStatus.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ GHDeploymentStatus lateBind(GHRepository owner) {

/**
* Gets target url.
* <p>
* This method replaces {@link #getTargetUrl() getTargetUrl}}.
*
* @return the target url
* @deprecated until preview feature has graduated to stable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ public GHDeploymentStatusBuilder environmentUrl(String environmentUrl) {

/**
* The full URL of the deployment's output.
* <p>
* This method replaces {@link #targetUrl(String) targetUrl}.
*
* @param logUrl
* the deployment output url
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/kohsuke/github/GHOrganization.java
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ public GHTeamBuilder createTeam(String name) {
public List<GHRepository> getRepositoriesWithOpenPullRequests() throws IOException {
List<GHRepository> r = new ArrayList<GHRepository>();
for (GHRepository repository : listRepositories(100)) {
List<GHPullRequest> pullRequests = repository.getPullRequests(GHIssueState.OPEN);
List<GHPullRequest> pullRequests = repository.queryPullRequests().state(GHIssueState.OPEN).list().toList();
if (pullRequests.size() > 0) {
r.add(repository);
}
Expand All @@ -499,7 +499,7 @@ public List<GHRepository> getRepositoriesWithOpenPullRequests() throws IOExcepti
public List<GHPullRequest> getPullRequests() throws IOException {
List<GHPullRequest> all = new ArrayList<GHPullRequest>();
for (GHRepository r : getRepositoriesWithOpenPullRequests()) {
all.addAll(r.getPullRequests(GHIssueState.OPEN));
all.addAll(r.queryPullRequests().state(GHIssueState.OPEN).list().toList());
}
return all;
}
Expand Down
14 changes: 0 additions & 14 deletions src/main/java/org/kohsuke/github/GHRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -1540,20 +1540,6 @@ public GHPullRequest getPullRequest(int i) throws IOException {
.wrapUp(this);
}

/**
* Retrieves all the pull requests of a particular state.
*
* @param state
* the state
* @return the pull requests
* @throws IOException
* the io exception
* @see #listPullRequests(GHIssueState) #listPullRequests(GHIssueState)
*/
public List<GHPullRequest> getPullRequests(GHIssueState state) throws IOException {
return queryPullRequests().state(state).list().toList();
}

/**
* Retrieves pull requests.
*
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/kohsuke/github/GHTreeBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public GHTreeBuilder baseTree(String baseTree) {
}

/**
* Specialized version of {@link #entry(String, String, String, String, String)} for adding an existing blob
* Specialized version of entry() for adding an existing blob
* referred by its SHA.
*
* @param path
Expand All @@ -98,7 +98,7 @@ public GHTreeBuilder shaEntry(String path, String sha, boolean executable) {
}

/**
* Specialized version of {@link #entry(String, String, String, String, String)} for adding a text file with the
* Specialized version of entry() for adding an existing blob
* specified {@code content}.
*
* @param path
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/org/kohsuke/github/GitHub.java
Original file line number Diff line number Diff line change
Expand Up @@ -846,10 +846,6 @@ public <T extends GHEventPayload> T parseEventPayload(Reader r, Class<T> type) t
* You use the returned builder to set various properties, then call {@link GHCreateRepositoryBuilder#create()} to
* finally create a repository.
*
* <p>
* To create a repository in an organization, see
* {@link GHOrganization#createRepository(String, String, String, GHTeam, boolean)}
*
* @param name
* the name
* @return the gh create repository builder
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/kohsuke/github/AppTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ public void testFetchPullRequest() throws Exception {
GHRepository r = gitHub.getOrganization("jenkinsci").getRepository("jenkins");
assertThat(r.getDefaultBranch(), equalTo("main"));
r.getPullRequest(1);
r.getPullRequests(GHIssueState.OPEN);
r.queryPullRequests().state(GHIssueState.OPEN).list().toList();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/kohsuke/github/GHPullRequestTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void cleanUp() throws Exception {
return;
}

for (GHPullRequest pr : getRepository(this.getNonRecordingGitHub()).getPullRequests(GHIssueState.OPEN)) {
for (GHPullRequest pr : getRepository(this.getNonRecordingGitHub()).queryPullRequests().state(GHIssueState.OPEN).list().toList()) {
pr.close();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ protected WireMockConfiguration getWireMockOptions() {
@Before
public void setupRepo() throws Exception {
if (mockGitHub.isUseProxy()) {
for (GHPullRequest pr : getRepository(this.getNonRecordingGitHub()).getPullRequests(GHIssueState.OPEN)) {
for (GHPullRequest pr : getRepository(this.getNonRecordingGitHub()).queryPullRequests().state(GHIssueState.OPEN).list().toList()) {
pr.close();
}
try {
Expand Down

0 comments on commit 5a453e0

Please sign in to comment.