Skip to content

Commit 668d0dc

Browse files
authored
[protected-files] Add .github and eng folders (#32194)
- Fixes #31629
1 parent be2fd48 commit 668d0dc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/protected-files.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ jobs:
2929
run: |
3030
. eng/scripts/ChangedFiles-Functions.ps1
3131
32-
$protectedFiles = @("package.json", "package-lock.json")
32+
$protectedFiles = @("package.json", "package-lock.json", ".github/*", "eng/*")
3333
$changedFiles = @(Get-ChangedFiles -baseCommitish HEAD^ -targetCommitish HEAD -diffFilter "")
34-
$matchedFiles = @($protectedFiles | Where-Object { $changedFiles -contains $_})
34+
35+
$matchedFiles = @($changedFiles | Where-Object { $changedFile = $_; $protectedFiles | ForEach-Object { $changedFile -like $_ } })
3536
3637
if ($matchedFiles.Count -gt 0) {
3738
foreach ($file in $matchedFiles) {

0 commit comments

Comments
 (0)