Class RepositoryPredicates
java.lang.Object
com.atlassian.bamboo.plugins.git.api.RepositoryPredicates
The RepositoryPredicates class provides a set of predicates that can be used to filter VcsRepositoryData objects.
These predicates can be used to match repositories based on certain criteria, such as the repository ID, branch, and repository slug.
- Since:
- 10.1
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Predicate<ImmutableChain>
branchMonitoringConfigurationMatchesBranchName
(@NotNull String vcsBranchName) Predicate that is fulfilled when plan has automatic branch management enabledstatic Predicate<VcsRepositoryData>
matchesQuery
(@NotNull CustomVariableContext customVariableContext, PlanRepositoryIndex.Query query, @NotNull RepositoryFinder repositoryFinder) Returns a Predicate that can be used to filter VcsRepositoryData objects based on a given query and a RepositoryFinder.
-
Constructor Details
-
RepositoryPredicates
public RepositoryPredicates()
-
-
Method Details
-
matchesQuery
public static Predicate<VcsRepositoryData> matchesQuery(@NotNull @NotNull CustomVariableContext customVariableContext, @NotNull PlanRepositoryIndex.Query query, @NotNull @NotNull RepositoryFinder repositoryFinder) Returns a Predicate that can be used to filter VcsRepositoryData objects based on a given query and a RepositoryFinder. The returned Predicate will return true for a VcsRepositoryData object if it matches the criteria specified in the query.- Parameters:
customVariableContext
- The context for custom variables in Bamboo.query
- The query specifying the criteria for matching repositories.repositoryFinder
- The RepositoryFinder used to match the repository slug.- Returns:
- A Predicate that returns true for VcsRepositoryData objects that match the specified query.
-
branchMonitoringConfigurationMatchesBranchName
public static Predicate<ImmutableChain> branchMonitoringConfigurationMatchesBranchName(@NotNull @NotNull String vcsBranchName) Predicate that is fulfilled when plan has automatic branch management enabled
-