Skip to content

Commit 8dce41c

Browse files
authored
Update a string value in Get PR Changed Files Script (Azure#26637)
* Update get-pr-changed-files.yml * Update get-pr-changed-files.yml
1 parent 58b9abd commit 8dce41c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.azure-pipelines/util/get-pr-changed-files.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ steps:
77
script: |
88
# refer to https://learn.microsoft.com/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#system-variables-devops-services
99
# get the target branch name
10-
$targetBranch = $(System.PullRequest.TargetBranch)
10+
$targetBranch = "$(System.PullRequest.TargetBranch)"
1111
# fetch the targetBranch from origin to local branch and rename the branch to 'origin/base'
1212
git fetch --no-tags origin "${targetBranch}:origin/base"
1313
# refer to https://git-scm.com/docs/git-diff
1414
# compare the pr and targetBranch branch, get the changed file list
15-
# diff-filter options are ACMRT, which are: Added, Copied, Modified, Renamed , Changed
16-
$changedFiles = git --no-pager diff --name-only --diff-filter=ACMRT origin/base -- .
15+
# diff-filter options are ACDMRT, which are: Added, Copied, Deleted, Modified, Renamed, Changed
16+
$changedFiles = git --no-pager diff --name-only --diff-filter=ACDMRT origin/base -- .
1717
Write-Host "Total updated files:" $changedFiles.Count
1818
Write-Host "All Updated files:"
1919
$changedFiles | Foreach-Object {Write-Host $_}

0 commit comments

Comments
 (0)