diff --git a/eng/common/scripts/get-markdown-files-from-changed-files.ps1 b/eng/common/scripts/get-markdown-files-from-changed-files.ps1 index 6316fd1ce26..4e0d48bb87e 100644 --- a/eng/common/scripts/get-markdown-files-from-changed-files.ps1 +++ b/eng/common/scripts/get-markdown-files-from-changed-files.ps1 @@ -2,7 +2,7 @@ param ( # The root repo we scaned with. [string] $RootRepo = '$PSScriptRoot/../../..', # The target branch to compare with. - [string] $targetBranch = "origin/${env:SYSTEM_PULLREQUEST_TARGETBRANCH}" + [string] $targetBranch = ("origin/${env:SYSTEM_PULLREQUEST_TARGETBRANCH}" -replace "/refs/heads/") ) $deletedFiles = (git diff $targetBranch HEAD --name-only --diff-filter=D) $renamedFiles = (git diff $targetBranch HEAD --diff-filter=R)