Skip to content

Commit

Permalink
[JENKINS-33901] Add bitbucket host validator
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio Mansilla committed May 6, 2016
1 parent ed69c7d commit ed13d4f
Showing 1 changed file with 19 additions and 0 deletions.
@@ -0,0 +1,19 @@
package org.jenkinsci.plugins.bitbucket.validator;

import com.google.common.collect.ImmutableSet;
import java.util.Set;

public class BitbucketHostValidator
{
final Set<String> supportedDomains = ImmutableSet.of("bitbucket.org", "altssh.bitbucket.org");

public boolean isValid(final String $value)
{
return this.supportedDomains.contains($value);
}

public String renderError()
{
return "Bitbucket build notifier support only repositories hosted in bitbucket.org";
}
}

0 comments on commit ed13d4f

Please sign in to comment.