Skip to content

Commit

Permalink
Sync eng/common directory with azure-sdk-tools for PR 2754 (Azure#23070)
Browse files Browse the repository at this point in the history
* Add configs

* Update eng/common/pipelines/templates/steps/credscan.yml

Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>

* Adding commnets

* wrong order

* Update credscan.yml

* Update credscan.yml

Co-authored-by: sima-zhu <sizhu@microsoft.com>
Co-authored-by: Sima Zhu <48036328+sima-zhu@users.noreply.github.com>
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
  • Loading branch information
4 people authored Feb 15, 2022
1 parent 1660ba8 commit 57a9787
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion eng/common/pipelines/templates/steps/credscan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ steps:
- pwsh: |
if ("$(Build.Reason)" -eq 'PullRequest') {
$targetBranch = "origin/$(System.PullRequest.TargetBranch)" -replace "refs/heads/"
$changedFiles = git diff $targetBranch HEAD --name-only --diff-filter=d
# Add config to disable the quote and encoding on file name.
# Ref: https://github.com/msysgit/msysgit/wiki/Git-for-Windows-Unicode-Support#disable-quoted-file-names
# Ref: https://github.com/msysgit/msysgit/wiki/Git-for-Windows-Unicode-Support#disable-commit-message-transcoding
$changedFiles = git -c core.quotepath=off -c i18n.logoutputencoding=utf-8 diff $targetBranch HEAD --name-only --diff-filter=d
$changedFiles | ForEach-Object { Add-Content -Path "${{ parameters.SourceDirectory }}/credscan.tsv" -Value "${{ parameters.SourceDirectory }}/$_"}
}
else {
Expand Down

0 comments on commit 57a9787

Please sign in to comment.