File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
eng/common/pipelines/templates/steps Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,9 @@ parameters:
77steps :
88- pwsh : |
99 if ("$(Build.Reason)" -eq 'PullRequest') {
10- (git diff "origin/$(System.PullRequest.TargetBranch)" HEAD --name-only)
11- | ForEach-Object { Add-Content -Path "${{ parameters.SourceDirectory }}/credscan.tsv" -Value "${{ parameters.SourceDirectory }}/$_"}
10+ $targetBranch = "origin/$(System.PullRequest.TargetBranch)" -replace "/refs/heads/"
11+ $changedFiles = git diff $targetBranch HEAD --name-only --diff-filter=d
12+ $changedFiles | ForEach-Object { Add-Content -Path "${{ parameters.SourceDirectory }}/credscan.tsv" -Value "${{ parameters.SourceDirectory }}/$_"}
1213 }
1314 else {
1415 Set-Content "${{ parameters.SourceDirectory }}/credscan.tsv" -Value "${{ parameters.SourceDirectory }}/sdk/${{ parameters.ServiceDirectory }}"
You can’t perform that action at this time.
0 commit comments