public class BranchingPolicy extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
BranchingPolicy.BranchNameTransformations |
| Modifier and Type | Field and Description |
|---|---|
static BranchingPolicy |
DEFAULT_FALLBACK
Default branching policy that sanitizes branch names as per jgtiver <=
0.2.0-alpha1;
|
| Constructor and Description |
|---|
BranchingPolicy(String recognitionPattern)
Builds a BranchingPolicy object using the given pattern as a recognition
Pattern. |
BranchingPolicy(String recognitionPattern,
List<String> transformationsNames)
Builds a BranchingPolicy object using the given pattern as a recognition
Patternand the given branches transformations |
BranchingPolicy(String recognitionPattern,
List<String> transformationsNames,
String versionPattern)
Builds a BranchingPolicy object using the given pattern as a recognition
Patternand the given branches transformations |
BranchingPolicy(String recognitionPattern,
String versionPattern)
Builds a BranchingPolicy object using the given pattern as a recognition
Pattern. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
appliesOn(String branch) |
static BranchingPolicy |
fixedBranchName(String name)
Builds a BranchingPolicy object that matches the given name and apply the default transformations.
|
static BranchingPolicy |
fixedBranchName(String name,
List<String> transformations)
Builds a BranchingPolicy object that matches the given name and apply the given transformations.
|
Optional<String> |
getVersionPattern() |
static BranchingPolicy |
ignoreBranchName(String name)
Builds a BranchingPolicy object that matches the given name for which the recognized branch name has not to be used, ie ignored.
|
Optional<String> |
qualifier(String branch) |
public static BranchingPolicy DEFAULT_FALLBACK
public BranchingPolicy(String recognitionPattern)
Pattern.
Some default branches transformations will be applied:
recognitionPattern - the string representing a Pattern used to isolate the name to use from the branch.
The pattern MUST contains at least one capture group.public BranchingPolicy(String recognitionPattern, String versionPattern)
Pattern.
Some default branches transformations will be applied:
recognitionPattern - the string representing a Pattern used to isolate the name to use from the branch.
The pattern MUST contains at least one capture group.versionPattern - optional version patternpublic BranchingPolicy(String recognitionPattern, List<String> transformationsNames)
Patternand the given branches transformationsrecognitionPattern - the string representing a Pattern used to isolate the name to use from the branch.
The pattern MUST contains at least one capture group.transformationsNames - the non null list of transformations to apply to the extracted namepublic BranchingPolicy(String recognitionPattern, List<String> transformationsNames, String versionPattern)
Patternand the given branches transformationsrecognitionPattern - the string representing a Pattern used to isolate the name to use from the branch.
The pattern MUST contains at least one capture group.transformationsNames - the non null list of transformations to apply to the extracted nameversionPattern - optional version patternpublic static BranchingPolicy fixedBranchName(String name, List<String> transformations)
name - the exact name to match against the git branchtransformations - the non null list of transformations to apply to the extracted namepublic static BranchingPolicy fixedBranchName(String name)
name - the exact name to match against the git branchpublic static BranchingPolicy ignoreBranchName(String name)
name - the exact name to match against the git branch to ignorepublic boolean appliesOn(String branch)
Copyright © 2016–2021 Matthieu Brouillard. All rights reserved.