PullRequestQuantifier uses a Yaml-style configuration. Henceforth, referred to as prquantifier.yaml
.
The prquantifier.yaml
is configured at a repository level, in the root directory of the repository. See this repository's example.
This is the general schema of the prquantifier.yaml
file.
# List of gitignore style paths to include for quantification.
# If populated, only files matching these patterns are included for counting.
# If empty, everything is included (can be filtered out by the next option "Excluded").
Included:
# List of gitignore style paths to exclude from quantification.
# "Included" is given preference. If "Included" above is set, "Excluded" is ignored.
Excluded:
# The operation types to consider. Only "Add" and "Delete" are possible.
# At this point, specifying single option is not supported, both "Add" and "Delete" must be specified.
GitOperationType:
- Add
- Delete
# Specify thresholds for applying labels, along with their configurations.
Thresholds:
# Operation type is required.
- GitOperationType:
- Add
- Delete
# Value specifies the number at which this threshold ends for the operation types specified above.
Value: 10
# The label that should be used as an output when a pull request falls into this threshold.
Label: Extra Small
# Color to use for outputting the above label.
Color: Green
# Formula to use to combine the "Add" and "Delete" operations.
# Supported values: Sum, Avg, Min, Max
Formula: Sum
- GitOperationType:
- Add
- Delete
Value: 40
Label: Small
Color: Green
Formula: Sum
# Options that are differ by the code language.
# Only C# is supported right now.
LanguageOptions:
# Ignore spaces and newlines.
IgnoreSpaces: true
# Ignore comments.
IgnoreComments: true
# Ignore code block separators. "{", "}", "{}".
IgnoreCodeBlockSeparator: true
DynamicBehaviour: false
# Ignore files that are only renamed (as detected by git).
IgnoreRenamed: true
# Ignore files that are copied (as detected by git).
IgnoreCopied: true
# auto-generated sections below...
# Percentiles generated by PullRequestQuantifier for labeling changes with a repository context percentile.
AdditionPercentile:
0: 0
1: 2
2: 4
999: 99.965988159179688
1000: 99.999320983886719
DeletionPercentile:
0: 0
1: 2
999: 99.965988159179688
1000: 99.999320983886719
FormulaPercentile:
- Item1: Sum
Item2:
0: 0
1: 2
999: 99.965988159179688
1000: 99.999320983886719
The default configuration for a repository is demonstrated below. You may override these settings by creating your own repository's yaml file.
This version's auto-generated section has been shortened for brevity. See full version for more detailed auto-generated section.
Included:
Excluded:
- '*.csproj'
- prquantifier.yaml
- package-lock.json
- '*.md'
- '*.sln'
GitOperationType:
- Add
- Delete
Thresholds:
- GitOperationType:
- Add
- Delete
Value: 10
Label: Extra Small
Color: Green
Formula: Sum
- GitOperationType:
- Add
- Delete
Value: 40
Label: Small
Color: Green
Formula: Sum
- GitOperationType:
- Add
- Delete
Value: 100
Label: Medium
Color: DarkYellow
Formula: Sum
- GitOperationType:
- Add
- Delete
Value: 400
Label: Large
Color: Red
Formula: Sum
- GitOperationType:
- Add
- Delete
Value: 1000
Label: Extra Large
Color: Red
Formula: Sum
LanguageOptions:
IgnoreSpaces: true
IgnoreComments: true
IgnoreCodeBlockSeparator: true
DynamicBehaviour: false
IgnoreRenamed: true
IgnoreCopied: true
# auto-generated sections below...
AdditionPercentile:
0: 0
1: 2
2: 4
999: 99.965988159179688
1000: 99.999320983886719
DeletionPercentile:
0: 0
1: 2
999: 99.965988159179688
1000: 99.999320983886719
FormulaPercentile:
- Item1: Sum
Item2:
0: 0
1: 2
999: 99.965988159179688
1000: 99.999320983886719
Here is a very simple and minimum context that has to be configured.
Thresholds:
- Value: 10
Label: Extra Small
Color: Green
- Value: 40
Label: Small
Color: Green
- Value: 100
Label: Medium
Color: Yellow
- Value: 400
Label: Large
Color: Red
- Value: 1000
Label: Extra Large
Color: Red