Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.net.URL;
import java.nio.file.Paths;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
Expand Down Expand Up @@ -50,7 +51,8 @@ public class CreatePRs implements IConstructorCommand {
public static final IStandardCommand COMMAND_FACTORY = IStandardCommand.of(invocation -> {
final String branch = new CommandLineStringInput(invocation, 1).fallback(new UserStringInput("Branch", true)).get();
final String title = new CommandLineStringInput(invocation, 2).fallback(new UserStringInput("Title", true)).get();
return new CreatePRs(new Context<BulldozerProject>(BulldozerProject::new, Paths.get(invocation.getArguments().get(0))), branch, title);
final Set<String> ignore = (invocation.getArguments().size() > 3) ? new HashSet<>(invocation.getArguments().subList(3, invocation.getArguments().size())) : HCollection.emptySet();
return new CreatePRs(new Context<BulldozerProject>(BulldozerProject::new, Paths.get(invocation.getArguments().get(0))), branch, title, ignore);
});

public static void main(String[] args) throws Throwable {
Expand All @@ -63,6 +65,8 @@ public static void main(String[] args) throws Throwable {

protected final String title;

protected final Set<String> ignore;

protected final boolean allowDirty = new PropertyStringInput("bulldozer.allowdirty").map(Boolean::valueOf).fallback(NullableOptional.of(false)).get();

@Override
Expand All @@ -79,6 +83,10 @@ public IExit invoke() throws Throwable {
// In topological order...
final Map<String, GHPullRequest> projectToPullRequest = new HashMap<>();
for (String name : order) {
if (getIgnore().contains(name)) {
log.info(String.format("Ignoring on %1$s", name));
continue;
}
log.info(String.format("Working on %1$s", name));
final BulldozerProject project = getContext().getProjects().get(name);
final String remote = HGit.getMyRemote(project.getGit());
Expand Down