From be7fbd5b741e6ce75f3c76d23efd392f6d490be1 Mon Sep 17 00:00:00 2001 From: Chidozie Ononiwu Date: Mon, 12 Oct 2020 18:40:24 -0700 Subject: [PATCH] Use github API to delete branches --- eng/common/scripts/Delete-RemoteBranches.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/scripts/Delete-RemoteBranches.ps1 b/eng/common/scripts/Delete-RemoteBranches.ps1 index 0dd201505891..6f683d7e3a38 100644 --- a/eng/common/scripts/Delete-RemoteBranches.ps1 +++ b/eng/common/scripts/Delete-RemoteBranches.ps1 @@ -38,7 +38,7 @@ foreach ($branch in $branches) { LogDebug "Branch [ $branchName ] in repo [ $RepoName ] has no associated Pull Request. Deleting Branch" try{ - Delete-References -RepoOwner $RepoOwner -RepoName $RepoName -Ref ($branch.Remove(0,5)) + Delete-References -RepoOwner $RepoOwner -RepoName $RepoName -Ref ($branch.Remove(0,5)) -AuthToken $AuthToken } catch { LogError "Delete-References failed with exception:`n$_"