Skip to content

Commit

Permalink
Skip LA rules in upate-test-rules workflow (#824)
Browse files Browse the repository at this point in the history
  • Loading branch information
cameron-dunn-sublime authored Sep 26, 2023
1 parent 9ed2b69 commit 83b7a4a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/update-test-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ jobs:
# but it doesn't seem any simpler). And then add testing metadata.
# If multiple PRs modify the same file, only one can be tested. This is solveable, but not something we see often.
for file in $files_changed; do
# Skip any LA rules. We'll ignore these downstream anyway, but best to keep the branch clean.
la_count=$(grep -c 'beta.linkanalysis' detection-rules/$file || true)
if [[ "$la_count" != '0' ]]; then
continue
fi
cp source/$file destination/$file
yq -i '.testing_pr = env(pr_num)' destination/$file
yq -i '.testing_sha = env(sha)' destination/$file
Expand Down

0 comments on commit 83b7a4a

Please sign in to comment.