Skip to content

Commit ab2b8b3

Browse files
author
James Brundage
committed
feat(git commit): Aliasing Scope to SubType ( Fixes #346 )
1 parent b2013c7 commit ab2b8b3

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Extensions/Git.Commit.Input.UGit.Extension.ps1

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,19 @@
1313
[CmdletBinding(PositionalBinding=$false)]
1414
param(
1515
# The title of the commit. If -Message is also provided, this will become part of the -Body
16+
[Parameter(ValueFromPipelineByPropertyName)]
1617
[Alias('Subject')]
1718
[string]
1819
$Title,
1920

2021
# The commit message.
22+
[Parameter(ValueFromPipelineByPropertyName)]
2123
[string]
2224
$Message,
2325

2426
# The type of the commit. This uses the conventional commits format.
2527
# https://www.conventionalcommits.org/en/v1.0.0/#specification
28+
[Parameter(ValueFromPipelineByPropertyName)]
2629
[ArgumentCompleter({
2730
param ( $commandName,
2831
$parameterName,
@@ -40,31 +43,38 @@ $Type,
4043

4144
# The scope of the commit. This uses the conventional commits format.
4245
# https://www.conventionalcommits.org/en/v1.0.0/#specification
46+
[Parameter(ValueFromPipelineByPropertyName)]
47+
[Alias('SubType')]
4348
[string]
4449
$Scope,
4550

4651
# A description of the commit. This uses the conventional commits format.
4752
# https://www.conventionalcommits.org/en/v1.0.0/#specification
53+
[Parameter(ValueFromPipelineByPropertyName)]
4854
[string]
4955
$Description,
5056

5157
# The footer for the commit. This uses the conventional commits format.
5258
# https://www.conventionalcommits.org/en/v1.0.0/#specification
59+
[Parameter(ValueFromPipelineByPropertyName)]
5360
[string]
5461
$Footer,
5562

5663
# The body of the commit.
64+
[Parameter(ValueFromPipelineByPropertyName)]
5765
[string]
5866
$Body,
5967

6068
# Any git trailers to add to the commit.
6169
# git trailers are key-value pairs you can use to associate metadata with a commit.
6270
# As this uses --trailer, this requires git version 2.33 or greater.
71+
[Parameter(ValueFromPipelineByPropertyName)]
6372
[Alias('Trailer','CommitMetadata','GitMetadata')]
6473
[Collections.IDictionary]
6574
$Trailers = [Ordered]@{},
6675

6776
# If set, will amend an existing commit.
77+
[Parameter(ValueFromPipelineByPropertyName)]
6878
[switch]
6979
$Amend,
7080

0 commit comments

Comments
 (0)