From e933b4cbf59e76c7114f056e082267f86c64b614 Mon Sep 17 00:00:00 2001 From: konstantin Date: Sat, 26 Aug 2023 01:08:38 +0300 Subject: [PATCH] Change target to wiremock files explicitly to custom repo --- src/test/java/org/kohsuke/github/AppTest.java | 4 ++-- src/test/java/org/kohsuke/github/GHRepositoryTest.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/java/org/kohsuke/github/AppTest.java b/src/test/java/org/kohsuke/github/AppTest.java index 847a68ec3f..03be7ca44a 100755 --- a/src/test/java/org/kohsuke/github/AppTest.java +++ b/src/test/java/org/kohsuke/github/AppTest.java @@ -1439,7 +1439,7 @@ public void testIssueSearch() throws IOException { */ @Test public void testPullRequestSearch() throws Exception { - GHRepository repository = getTestRepository(); + GHRepository repository = gitHub.getRepository("kgromov/github-api-test"); String mainHead = repository.getRef("heads/main").getObject().getSha(); GHRef devBranch = repository.createRef("refs/heads/kgromov-test", mainHead); repository.createContent() @@ -1448,7 +1448,7 @@ public void testPullRequestSearch() throws Exception { .path(devBranch.getRef()) .branch(devBranch.getRef()) .commit(); - LocalDate createdDate = LocalDate.now(); + LocalDate createdDate = LocalDate.parse("2023-08-23"); GHPullRequest newPR = repository .createPullRequest("New PR", devBranch.getRef(), "refs/heads/main", "Hello, merged PR"); newPR.setLabels("test"); diff --git a/src/test/java/org/kohsuke/github/GHRepositoryTest.java b/src/test/java/org/kohsuke/github/GHRepositoryTest.java index 02a8a2d4c2..0bf880a317 100644 --- a/src/test/java/org/kohsuke/github/GHRepositoryTest.java +++ b/src/test/java/org/kohsuke/github/GHRepositoryTest.java @@ -1716,7 +1716,7 @@ public void cannotRetrievePermissionMaintainUser() throws IOException { */ @Test public void testSearchPullRequests() throws Exception { - GHRepository repository = getTempRepository(); + GHRepository repository = gitHub.getRepository("kgromov/temp-testSearchPullRequests"); String mainHead = repository.getRef("heads/main").getObject().getSha(); GHRef devBranch = repository.createRef("refs/heads/dev", mainHead); repository.createContent() @@ -1731,7 +1731,7 @@ public void testSearchPullRequests() throws Exception { ghPullRequest.merge("Merged test PR"); Thread.sleep(1000); LocalDate from = LocalDate.parse("2023-08-01"); - LocalDate to = LocalDate.now(); + LocalDate to = LocalDate.parse("2023-08-23"); GHPullRequestSearchBuilder searchBuilder = gitHub.searchPullRequests() .createdByMe() .isMerged()