if (uriSplit.length > 0) {
switch (ConsumerType.fromUri(uriSplit[0])) {
case COMMIT:
if (uriSplit.length >= 2 && uriSplit[1].length() > 1) {
return new CommitConsumer(uriSplit[1], this, processor);
} else {
throw new IllegalArgumentException("Must provide a branch name when using the COMMIT consumer. github://commit/[branch name]?[options]");
}
case PULLREQUEST:
return new PullRequestConsumer(this, processor);