The Extended preset
This preset can be used by setting the preset
global configuration option value to extended
and brings rich standard configurations suitable for projects with several options in place.
Changelog
A standard changelog configuration is included in this preset. The destination file is CHANGELOG.md
(in the current working directory) and is rendered using the default template.
The rendered changelog uses the default template so its content is flat and no links are produced to any specific hosting service. Sections include commits matched by both the Conventional Commits and gitmoji conventions.
This corresponds to the following configuration options:
Name | Value |
---|---|
changelog/path |
CHANGELOG.md |
changelog/sections/Added |
"^(feat|:boom:|:sparkles:)$" |
changelog/sections/Fixed |
”^(fix|:bug:|:ambulance:)$ ” |
changelog/sections/Removed |
”^:fire:$ ” |
changelog/sections/Security |
”^:lock:$ ” |
Commit message conventions
The Conventional Commits, Conventional Commits For Merge and gitmoji conventions come with this preset. Conventional Commits and gitmoji are enabled by default, while Conventional Commits For Merge is not.
The Conventional Commits For Merge convention is not compliant to Conventional Commits and is not officially supported. It is useful when parsing merge commits bringing details on multiple commits (usually squashed), each one with it’s message title listed in the body of the merge commit message. This convention is able to match the message multiple times, each time yielding to a (potentially) different bump identifier. If you want to use this convention and you’re using this preset you need to enable it explicitly, otherwise you can copy its configuration attributes below to your custom configuration.
This corresponds to the following configuration options:
Name | Value |
---|---|
commitMessageConventions/enabled |
[“conventionalCommits ”, “gitmoji ”] |
commitMessageConventions/conventionalCommits/expression |
”(?m)^(?<type>[a-zA-Z0-9_]+)(\((?<scope>[a-z ]+)\))?(!)?:( (?<title>.+))$(?s).* ” |
commitMessageConventions/conventionalCommits/bumpExpressions |
“major ” = “(?s)(?m)^[a-zA-Z0-9_]+(!: .*|.*^(BREAKING( |-)CHANGE: )).* ”, “minor ” = “(?s)(?m)^feat(!{0})(\([a-z ]+\))?: (?!.*^(BREAKING( |-)CHANGE: )).* ”, “patch ” = “(?s)(?m)^fix(!{0})(\([a-z ]+\))?: (?!.*^(BREAKING( |-)CHANGE: )).* ” |
commitMessageConventions/conventionalCommitsForMerge/expression |
”(?<type>[a-zA-Z0-9_]+)(!)?(\\((?<scope>[a-z ]+)\\))?:( (?<title>.+)) ” |
commitMessageConventions/conventionalCommitsForMerge/bumpExpressions |
“major ” = “(?s)(?m)[a-zA-Z0-9_]+(!: .*|.*^(BREAKING( |-)CHANGE: )).* ”, “minor ” = “(?s)(?m)feat(!{0})(\\([a-z ]+\\))?: (?!.*^(BREAKING( |-)CHANGE: )).* ”, “patch ” = “(?s)(?m)fix(!{0})(\\([a-z ]+\\))?: (?!.*^(BREAKING( |-)CHANGE: )).* ” |
commitMessageConventions/gitmoji/expression |
”(?m)^(:(?<type>[a-zA-Z0-9_]+):)( (?<title>.+))?$(?s).* ” |
commitMessageConventions/gitmoji/bumpExpressions |
“major ” = “(?m)^:boom:(?s).* ”, “minor ” = “(?m)^:sparkles:(?s).* ”, “patch ” = “(?m)^:(zap|bug|ambulance|lipstick|lock|arrow_down|arrow_up|pushpin|chart_with_upwards_trend|heavy_plus_sign|heavy_minus_sign|wrench|globe_with_meridians|pencil2|rewind|package|alien|bento|wheelchair|speech_balloon|card_file_box|children_crossing|iphone|egg|alembic|mag|label|triangular_flag_on_post|goal_net|dizzy|wastebasket|passport_control|adhesive_bandage):(?s).* ” |
Please note that gitmoji is listed after Conventional Commits so when a commit message is evaluated, gitmoji is only taken into account if matching it against Conventional Commit does not yield to a positive match.
Release types
This preset comes with a set of release types, suitable for a mainline branching model plus integration, maturity, feature, fix, hotfix, release and maintenance. An additional release type called internal is configured as a fallback when the mainline isn’t matched.
You may notice that fix and hotfix are different types in that hotfix is meant to deliver (and publish) a new release while the (simple) fix is supposed to happen under regular conditions, with no need to issue a new release, and behaves pretty much like a feature release type with just a different prefix in branches and tags.
Please note that even if a release type has its publish
flag enabled, publication to remote services doesn’t happen because no service is listed in the publicationServices
list. If you want to publish releases using this preset as a starting point you need to override the releaseTypes/publicationServices
with the services you want to use as target (which may be the ones configured in the preset services or some custom one).
This corresponds to the following configuration options:
Services
The GitHub and GitLab services are available with this preset. They both use standard remote URIs so unless you use a privately hosted instance you don’t need to change it. Authentication tokens are read from environment variables (GITHUB_TOKEN
and GITLAB_TOKEN
, respectively) so you can just set those variables to a valid Personal Access Token and you’re set.
You still need to set the remaining options.
This corresponds to the following configuration options:
Name | Value |
---|---|
services/github/type |
GITHUB |
services/github/options/AUTHENTICATION_TOKEN |
"{{#environmentVariable}}GITHUB_TOKEN{{/environmentVariable}}" |
services/github/options/REPOSITORY_NAME |
Empty |
services/github/options/REPOSITORY_OWNER |
Empty |
services/gitlab/type |
GITLAB |
services/gitlab/options/AUTHENTICATION_TOKEN |
"{{#environmentVariable}}GITLAB_TOKEN{{/environmentVariable}}" |
services/gitlab/options/REPOSITORY_NAME |
Empty |
services/gitlab/options/REPOSITORY_OWNER |
Empty |
Substitutions
Substitutions for a commn set of technologies is provided with this preset (names are the rule names you can use to enable the rules):
cargo_version
: sets the version attribute inCargo.toml
files in the project directory, useful for Rust projectscomposer_version
: sets the version attribute incomposer.json
files in the project directory, useful for PHP projectsdart_version
: sets the version attribute inpubspec.yaml
files in the project directory, useful for Flutter and Dart projectselixir_version
: sets the version attribute inmix.exs
files in the project directory, useful for Elixir projectsexpo_version
: sets the version attribute inapp.json
andapp.config.json
files in the project directory, useful for React projectshelm_version
: sets the version attribute inChart.yaml
files in the project directory, useful for Rust projectsnode_version
: sets the version attribute inpackage.json
files in the project directory, useful for Node projectstext_version
: writes the version inversion.txt
files in the project directory, useful in many project automations
All these presets replace the version number in files at any depth in the project layout so, for example, you can have multiple package.json
file in your project tree and they will all get the updated version number. If this behavior doesn’t fit your needs you can just override the substitution rule and make the files
attribute more specific.
This corresponds to the following configuration options:
Name | Value |
---|---|
substitutions/enabled |
none |
substitutions/cargo_version/files |
**/Cargo.toml |
substitutions/cargo_version/match |
version(\\s)*=(\\s)*(\"|')?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?(\"|')? |
substitutions/cargo_version/replace |
version = \"{{version}}\" |
substitutions/composer_version/files |
**/composer.json |
substitutions/composer_version/match |
\"version\"(\\s)*:(\\s)*\"(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?\" |
substitutions/composer_version/replace |
\"version\": \"{{version}}\" |
substitutions/dart_version/files |
**/pubspec.yaml |
substitutions/dart_version/match |
(\"|')?version(\"|')?(\\s)*:(\\s)*(\"|')?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?(\"|')? |
substitutions/dart_version/replace |
version: \"{{version}}\" |
substitutions/elixir_version/files |
**/mix.exs |
substitutions/elixir_version/match |
version(\\s)*:(\\s)*\"(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?\" |
substitutions/elixir_version/replace |
version: \"{{version}}\" |
substitutions/expo_version/files |
**/{app,app.config}.json |
substitutions/expo_version/match |
\"version\"(\\s)*:(\\s)*\"(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?\" |
substitutions/expo_version/replace |
\"version\": \"{{version}}\" |
substitutions/helm_version/files |
**/Chart.yaml |
substitutions/helm_version/match |
(\"|')?version(\"|')?(\\s)*:(\\s)*(\"|')?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?(\"|')? |
substitutions/helm_version/replace |
version: \"{{version}}\" |
substitutions/node_version/files |
**/package.json |
substitutions/node_version/match |
\"version\"(\\s)*:(\\s)*\"(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?\" |
substitutions/node_version/replace |
\"version\": \"{{version}}\" |
substitutions/text_version/files |
**/version.txt |
substitutions/text_version/match |
(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))? |
substitutions/text_version/replace |
{{version}} |