Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaosongzs committed Apr 16, 2024
1 parent 1513bcc commit 98c954b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ class CheckRun {
private final Set<String> newLabels;
private final boolean reviewCleanBackport;
private final Approval approval;
private final boolean reviewersCommandIssued;

private Duration expiresIn;
// Only set if approval is configured for the repo
private String realTargetRef;
private boolean missingApprovalRequest = false;
private final boolean reviewersCommandIssued;

private CheckRun(CheckWorkItem workItem, PullRequest pr, Repository localRepo, List<Comment> comments,
List<Review> allReviews, List<Review> activeReviews, Set<String> labels,
Expand Down
25 changes: 0 additions & 25 deletions bots/pr/src/test/java/org/openjdk/skara/bots/pr/MergeTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -289,31 +289,6 @@ void branchMergeWithReviewersCommand(TestInfo testInfo) throws IOException {
.filter(comment -> comment.body().contains("Pushed as commit"))
.count();
assertEquals(1, pushed);

// The change should now be present on the master branch
var pushedRepoFolder = tempFolder.path().resolve("pushedrepo");
var pushedRepo = Repository.materialize(pushedRepoFolder, author.authenticatedUrl(), "master");
assertTrue(CheckableRepository.hasBeenEdited(pushedRepo));

// The commits from the "other" branch should be preserved and not squashed (but not the merge commit)
var headHash = pushedRepo.resolve("HEAD").orElseThrow();
Set<Hash> commits;
try (var tempCommits = pushedRepo.commits(masterHash.hex() + ".." + headHash.hex())) {
commits = tempCommits.stream()
.map(Commit::hash)
.collect(Collectors.toSet());
}
assertTrue(commits.contains(otherHash1));
assertTrue(commits.contains(otherHash2));
assertFalse(commits.contains(mergeHash));

// Author and committer should updated in the merge commit
var headCommit = pushedRepo.commits(headHash.hex() + "^.." + headHash.hex()).asList().get(0);
assertEquals("Merge " + author.name() + ":other_/-1.2", headCommit.message().get(0));
assertEquals("Generated Committer 1", headCommit.author().name());
assertEquals("integrationcommitter1@openjdk.org", headCommit.author().email());
assertEquals("Generated Committer 1", headCommit.committer().name());
assertEquals("integrationcommitter1@openjdk.org", headCommit.committer().email());
}
}

Expand Down

0 comments on commit 98c954b

Please sign in to comment.