Skip to content

Commit

Permalink
update triggers for files covered by gh actions (#3344)
Browse files Browse the repository at this point in the history
Fixes #3296
  • Loading branch information
m-nash committed May 14, 2024
1 parent 59db512 commit b477dc3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
16 changes: 16 additions & 0 deletions eng/common/scripts/Analyze-Changes.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,20 @@ Describe 'Analyze-Changes' {
$_ | Should -BeIn $expected
}
}

It 'Should not return runCore for .prettierignore, .prettierrc.json, cspell.yaml, esling.config.json' {
$actual = Get-ActiveVariables @(
".prettierignore",
".prettierrc.json",
"cspell.yaml",
"esling.config.json"
"packages/http-client-csharp/emitter/src/constants.ts"
)

$expected = @('RunCore', 'RunCSharp')

$actual | ForEach-Object {
$_ | Should -BeIn $expected
}
}
}
5 changes: 5 additions & 0 deletions eng/common/scripts/Analyze-Changes.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ class TreeNode {

# if anything in first level is not 'packages', return true
foreach ($child in $this.Children) {
# skip .prettierignore, .prettierrc.json, cspell.yaml, esling.config.json since these are all covered by github actions globally
if ($child.Name -in @('.prettierignore', '.prettierrc.json', 'cspell.yaml', 'esling.config.json')) {
continue
}

if ($child.Name -ne 'packages') {
return $true
}
Expand Down

0 comments on commit b477dc3

Please sign in to comment.