Skip to content

Commit 6f17604

Browse files
Remove AmendCommit parameter (Azure#14965)
Co-authored-by: Chidozie Ononiwu <chononiw@microsoft.com>
1 parent cf83946 commit 6f17604

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

eng/common/scripts/Delete-RemoteBranches.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ foreach ($branch in $branches)
3030
exit 1
3131
}
3232

33-
if ($pullRequests -and (($pullRequests | ? { $_.State -eq "open" }).Count -eq 0))
33+
$openPullRequests = $pullRequests | ? { $_.State -eq "open" }
34+
35+
if ($openPullRequests.Count -eq 0)
3436
{
3537
LogDebug "Branch [ $branchName ] in repo [ $RepoName ] has no associated open Pull Request. Deleting Branch"
3638
try{

eng/common/scripts/git-branch-push.ps1

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@ param(
3030
[string] $RemoteName = "azure-sdk-fork",
3131

3232
[Parameter(Mandatory = $false)]
33-
[boolean] $SkipCommit = $false,
34-
35-
[Parameter(Mandatory = $false)]
36-
[boolean] $AmendCommit = $false
33+
[boolean] $SkipCommit = $false
3734
)
3835

3936
# This is necessay because of the janky git command output writing to stderr.
@@ -69,14 +66,8 @@ if ($LASTEXITCODE -ne 0)
6966
}
7067

7168
if (!$SkipCommit) {
72-
if ($AmendCommit) {
73-
Write-Host "git -c user.name=`"azure-sdk`" -c user.email=`"azuresdk@microsoft.com`" commit -am `"$($CommitMsg)`""
74-
git -c user.name="azure-sdk" -c user.email="azuresdk@microsoft.com" commit --amend -am "$($CommitMsg)"
75-
}
76-
else {
77-
Write-Host "git -c user.name=`"azure-sdk`" -c user.email=`"azuresdk@microsoft.com`" commit --amend -am `"$($CommitMsg)`""
78-
git -c user.name="azure-sdk" -c user.email="azuresdk@microsoft.com" commit -am "$($CommitMsg)"
79-
}
69+
Write-Host "git -c user.name=`"azure-sdk`" -c user.email=`"azuresdk@microsoft.com`" commit --amend -am `"$($CommitMsg)`""
70+
git -c user.name="azure-sdk" -c user.email="azuresdk@microsoft.com" commit --amend -am "$($CommitMsg)"
8071
if ($LASTEXITCODE -ne 0)
8172
{
8273
Write-Error "Unable to add files and create commit LASTEXITCODE=$($LASTEXITCODE), see command output above."

0 commit comments

Comments
 (0)