@ExportedBean public class BranchSpec extends AbstractDescribableImpl<BranchSpec> implements Serializable
master origin/master origin/* origin/*/thing
| Modifier and Type | Class and Description |
|---|---|
static class |
BranchSpec.DescriptorImpl |
| Constructor and Description |
|---|
BranchSpec(String name) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
filterMatching(Collection<String> branches)
Deprecated.
|
List<String> |
filterMatching(Collection<String> branches,
EnvVars env) |
List<hudson.plugins.git.Branch> |
filterMatchingBranches(Collection<hudson.plugins.git.Branch> branches) |
List<hudson.plugins.git.Branch> |
filterMatchingBranches(Collection<hudson.plugins.git.Branch> branches,
EnvVars env) |
String |
getName() |
boolean |
matches(String item) |
boolean |
matches(String ref,
EnvVars env)
Compare a git branch reference to configured pattern.
|
boolean |
matchesRepositoryBranch(String repositoryName,
String branchName)
Compare the configured pattern to a git branch defined by the repository name and branch name.
|
void |
setName(String name) |
String |
toString() |
getDescriptor@DataBoundConstructor public BranchSpec(String name)
@Exported public String getName()
public void setName(String name)
public boolean matches(String item)
public boolean matches(String ref, EnvVars env)
reference uses normalized format `ref/(heads|tags)/xx` pattern do support
ref - branch reference to compareenv - environment variables to use in comparisonpublic boolean matchesRepositoryBranch(String repositoryName, String branchName)
repositoryName - git repository namebranchName - git branch namepublic List<String> filterMatching(Collection<String> branches)
filterMatching(Collection, EnvVars)branches - source branch list to be filtered by configured branch specification using a newly constructed EnvVarspublic List<String> filterMatching(Collection<String> branches, EnvVars env)
public List<hudson.plugins.git.Branch> filterMatchingBranches(Collection<hudson.plugins.git.Branch> branches)
public List<hudson.plugins.git.Branch> filterMatchingBranches(Collection<hudson.plugins.git.Branch> branches, EnvVars env)
Copyright © 2007–2021. All rights reserved.