Skip to content

Commit dbed90b

Browse files
committed
Docs changes
1 parent f7919ad commit dbed90b

File tree

1 file changed

+35
-10
lines changed

1 file changed

+35
-10
lines changed

docs/input/docs/reference/configuration.md

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ tracks-release-branches: false
208208
is-release-branch: false
209209
is-main-branch: false
210210
```
211-
<sup><a href='/docs/workflows/GitFlow/v1.yml#L1-L167' title='Snippet source file'>snippet source</a> | <a href='#snippet-/docs/workflows/GitFlow/v1.yml' title='Start of snippet'>anchor</a></sup>
211+
<sup><a href='/docs/workflows/GitFlow/v1.yml#L1-L166' title='Snippet source file'>snippet source</a> | <a href='#snippet-/docs/workflows/GitFlow/v1.yml' title='Start of snippet'>anchor</a></sup>
212212
<!-- endSnippet -->
213213

214214
The supported built-in configuration for the `GitHubFlow` workflow (`workflow: GitHubFlow/v1`) looks like:
@@ -332,7 +332,7 @@ tracks-release-branches: false
332332
is-release-branch: false
333333
is-main-branch: false
334334
```
335-
<sup><a href='/docs/workflows/GitHubFlow/v1.yml#L1-L116' title='Snippet source file'>snippet source</a> | <a href='#snippet-/docs/workflows/GitHubFlow/v1.yml' title='Start of snippet'>anchor</a></sup>
335+
<sup><a href='/docs/workflows/GitHubFlow/v1.yml#L1-L115' title='Snippet source file'>snippet source</a> | <a href='#snippet-/docs/workflows/GitHubFlow/v1.yml' title='Start of snippet'>anchor</a></sup>
336336
<!-- endSnippet -->
337337

338338
The preview built-in configuration (experimental usage only) for the `TrunkBased` workflow (`workflow: TrunkBased/preview1`) looks like:
@@ -441,7 +441,7 @@ tracks-release-branches: false
441441
is-release-branch: false
442442
is-main-branch: false
443443
```
444-
<sup><a href='/docs/workflows/TrunkBased/preview1.yml#L1-L101' title='Snippet source file'>snippet source</a> | <a href='#snippet-/docs/workflows/TrunkBased/preview1.yml' title='Start of snippet'>anchor</a></sup>
444+
<sup><a href='/docs/workflows/TrunkBased/preview1.yml#L1-L100' title='Snippet source file'>snippet source</a> | <a href='#snippet-/docs/workflows/TrunkBased/preview1.yml' title='Start of snippet'>anchor</a></sup>
445445
<!-- endSnippet -->
446446

447447
The details of the available options are as follows:
@@ -687,7 +687,7 @@ branches:
687687
is-main-branch: false
688688
pre-release-weight: 0
689689
release:
690-
regex: ^releases?[\/-]
690+
regex: ^releases?[/-]
691691
mode: ContinuousDelivery
692692
label: beta
693693
increment: None
@@ -699,28 +699,29 @@ branches:
699699
is-main-branch: false
700700
pre-release-weight: 30000
701701
feature:
702-
regex: ^features?[\/-]
702+
regex: ^features?[/-]
703703
mode: ContinuousDelivery
704704
label: '{BranchName}'
705705
increment: Inherit
706706
source-branches: [ 'develop', 'main', 'release', 'feature', 'support', 'hotfix' ]
707707
pre-release-weight: 30000
708708
pull-request:
709-
regex: ^(pull-requests|pull|pr)[\/-]
709+
regex: ^(pull|pull\-requests|pr)[/-]
710710
mode: ContinuousDelivery
711711
label: PullRequest
712712
increment: Inherit
713+
label-number-pattern: '[/-](?<number>\d+)[-/]'
713714
source-branches: [ 'develop', 'main', 'release', 'feature', 'support', 'hotfix' ]
714715
pre-release-weight: 30000
715716
hotfix:
716-
regex: ^hotfix(es)?[\/-]
717+
regex: ^hotfix(es)?[/-]
717718
mode: ContinuousDelivery
718719
label: beta
719720
increment: Inherit
720721
source-branches: [ 'release', 'main', 'support', 'hotfix' ]
721722
pre-release-weight: 30000
722723
support:
723-
regex: ^support[\/-]
724+
regex: ^support[/-]
724725
mode: ContinuousDelivery
725726
label: ''
726727
increment: Patch
@@ -836,9 +837,9 @@ The pre-release label to use for this branch. Use the value `{BranchName}` as a
836837
insert the value of the named group `BranchName` from the [regular expression](#regex).
837838

838839
For example: branch `feature/foo` would become a pre-release label
839-
of `alpha.foo` with `label: 'alpha.{BranchName}'` and `regex: '^features?[\/-](?<BranchName>.+)'`.
840+
of `alpha.foo` with `label: 'alpha.{BranchName}'` and `regex: '^features?[/-](?<BranchName>.+)'`.
840841

841-
Another example: branch `features/sc-12345/some-description` would become a pre-release label of `sc-12345` with `label: '{StoryNo}'` and `regex: '^features?[\/-](?<StoryNo>sc-\d+)[-/].+'`.
842+
Another example: branch `features/sc-12345/some-description` would become a pre-release label of `sc-12345` with `label: '{StoryNo}'` and `regex: '^features?[/-](?<StoryNo>sc-\d+)[-/].+'`.
842843

843844
**Note:** To clear a default use an empty string: `label: ''`
844845

@@ -867,6 +868,30 @@ The increment of the merged branch will be ignored when this branch related prop
867868

868869
This branch related property controls the behvior whether to use the tagged (value set to true) or the incremented (value set to false) semantic version. Defaults to true.
869870

871+
### label-number-pattern
872+
873+
Pull requests require us to extract the pre-release number out of the branch
874+
name so `refs/pulls/534/merge` builds as `PullRequest.534`. This is a regex with
875+
a named capture group called `number`.
876+
877+
If the branch `mode` is set to `ContinuousDeployment`, then the extracted
878+
`number` is appended to the name of the pre-release label and the number portion
879+
is the number of commits since the last label. This enables consecutive commits to
880+
the pull request branch to generate unique full semantic version numbers when
881+
the branch is configured to use ContinuousDeployment mode.
882+
883+
**Example usage:**
884+
885+
```yaml
886+
branches:
887+
pull-request:
888+
mode: ContinuousDeployment
889+
label: PullRequest
890+
increment: Inherit
891+
track-merge-target: true
892+
label-number-pattern: '[/-](?<number>\d+)[-/]'
893+
```
894+
870895
### track-merge-target
871896

872897
Strategy which will look for tagged merge commits directly off the current

0 commit comments

Comments
 (0)