@@ -40,7 +40,12 @@ inputs:
40
40
required : false
41
41
description : |
42
42
If set, will not push any changes made to the repository.
43
- (they will still be committed unless -NoCommit is passed)
43
+ (they will still be committed unless `-NoCommit` is passed)
44
+ NoCommit :
45
+ required : false
46
+ description : |
47
+ If set, will not commit any changes made to the repository.
48
+ (this also implies `-NoPush`)
44
49
branding :
45
50
icon : git-merge
46
51
color : blue
60
65
ActionScript : ${{inputs.ActionScript}}
61
66
TargetBranch : ${{inputs.TargetBranch}}
62
67
UserEmail : ${{inputs.UserEmail}}
68
+ NoCommit : ${{inputs.NoCommit}}
63
69
UserName : ${{inputs.UserName}}
64
70
run : |
65
71
$Parameters = @{}
77
83
$Parameters.UserName = ${env:UserName}
78
84
$Parameters.NoPush = ${env:NoPush}
79
85
$Parameters.NoPush = $parameters.NoPush -match 'true';
86
+ $Parameters.NoCommit = ${env:NoCommit}
87
+ $Parameters.NoCommit = $parameters.NoCommit -match 'true';
80
88
foreach ($k in @($parameters.Keys)) {
81
89
if ([String]::IsNullOrEmpty($parameters[$k])) {
82
90
$parameters.Remove($k)
@@ -141,9 +149,14 @@ runs:
141
149
$UserName,
142
150
143
151
# If set, will not push any changes made to the repository.
144
- # (they will still be committed unless -NoCommit is passed)
152
+ # (they will still be committed unless `-NoCommit` is passed)
153
+ [switch]
154
+ $NoPush,
155
+
156
+ # If set, will not commit any changes made to the repository.
157
+ # (this also implies `-NoPush`)
145
158
[switch]
146
- $NoPush
159
+ $NoCommit
147
160
)
148
161
149
162
$ErrorActionPreference = 'continue'
@@ -394,7 +407,7 @@ runs:
394
407
} elseif ($outItem) {
395
408
$outItem.FullName, (git status $outItem.Fullname -s)
396
409
}
397
- if ($shouldCommit) {
410
+ if ($shouldCommit -and -not $NoCommit ) {
398
411
"$fullName has changed, and should be committed" | Out-Host
399
412
git add $fullName
400
413
if ($out.Message) {
0 commit comments