Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial implementation of dependent pull requests #886

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -303,6 +303,9 @@ public void onNewOpenJDKTagCommits(HostedRepository repository, Repository local
String tagBranch = null;
try {
for (var branch : repository.branches()) {
if (PreIntegrations.isPreintegrationBranch(branch.name())) {
continue;
}
var hash = localRepository.resolve(tag.tag()).orElseThrow();
if (localRepository.isAncestor(hash, branch.hash())) {
if (tagBranch == null) {
@@ -145,6 +145,7 @@ private List<String> allowedTargetBranches() {
.branches()
.stream()
.map(HostedBranch::name)
.filter(name -> !PreIntegrations.isPreintegrationBranch(name))
.map(name -> workItem.bot.allowedTargetBranches().matcher(name))
.filter(Matcher::matches)
.map(Matcher::group)
@@ -263,7 +263,6 @@ public Hash branchHash(String ref) {
public List<HostedBranch> branches() {
var branches = request.get("branches").execute();
return branches.stream()
.filter(b -> !PreIntegrations.isPreintegrationBranch(b.get("name").asString()))
.map(b -> new HostedBranch(b.get("name").asString(),
new Hash(b.get("commit").get("sha").asString())))
.collect(Collectors.toList());
@@ -285,7 +285,6 @@ public Hash branchHash(String ref) {
public List<HostedBranch> branches() {
var branches = request.get("repository/branches").execute();
return branches.stream()
.filter(b -> !PreIntegrations.isPreintegrationBranch(b.get("name").asString()))
.map(b -> new HostedBranch(b.get("name").asString(),
new Hash(b.get("commit").get("id").asString())))
.collect(Collectors.toList());
@@ -195,9 +195,7 @@ public List<HostedBranch> branches() {
try {
var result = new ArrayList<HostedBranch>();
for (var b : localRepository.branches()) {
if (!PreIntegrations.isPreintegrationBranch(b.name())) {
result.add(new HostedBranch(b.name(), localRepository.resolve(b).orElseThrow()));
}
result.add(new HostedBranch(b.name(), localRepository.resolve(b).orElseThrow()));
}
return result;
} catch (IOException e) {