< prev index next > bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestInstance.java
Print this page
PullRequestInstance(Path localRepoPath, PullRequest pr) throws IOException {
this.pr = pr;
var repository = pr.repository();
// Materialize the PR's target ref
! localRepo = Repository.materialize(localRepoPath, repository.url(), pr.targetRef());
targetHash = localRepo.fetch(repository.url(), pr.targetRef());
headHash = localRepo.fetch(repository.url(), pr.headHash().hex());
baseHash = localRepo.mergeBase(targetHash, headHash);
}
PullRequestInstance(Path localRepoPath, PullRequest pr) throws IOException {
this.pr = pr;
var repository = pr.repository();
// Materialize the PR's target ref
! localRepo = Repository.materialize(localRepoPath, repository.url(),
+ "+" + pr.targetRef() + ":pr_prinstance_" + repository.name());
targetHash = localRepo.fetch(repository.url(), pr.targetRef());
headHash = localRepo.fetch(repository.url(), pr.headHash().hex());
baseHash = localRepo.mergeBase(targetHash, headHash);
}
< prev index next >