Fixed the prefix of the target branch (#3338)
Co-authored-by: sima-zhu <sizhu@microsoft.com>
This commit is contained in:
parent
c905080138
commit
dc1ce53a34
@ -7,7 +7,7 @@ parameters:
|
||||
steps:
|
||||
- pwsh: |
|
||||
if ("$(Build.Reason)" -eq 'PullRequest') {
|
||||
$targetBranch = "origin/$(System.PullRequest.TargetBranch)" -replace "/refs/heads/"
|
||||
$targetBranch = "origin/$(System.PullRequest.TargetBranch)" -replace "refs/heads/"
|
||||
$changedFiles = git diff $targetBranch HEAD --name-only --diff-filter=d
|
||||
$changedFiles | ForEach-Object { Add-Content -Path "${{ parameters.SourceDirectory }}/credscan.tsv" -Value "${{ parameters.SourceDirectory }}/$_"}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user