Skip to content

Commit 78a2d30

Browse files
committed
ci(exclusions): fix loss of untracked list
1 parent 35940e7 commit 78a2d30

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/exclusions.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ jobs:
4545
run: |
4646
git fetch origin exclusions || true
4747
48-
if git show origin/exclusions:exclusions.txt >/dev/null 2>&1; then
48+
if git show origin/exclusions:false_positive_exclusions.txt >/dev/null 2>&1; then
4949
# If the exclusions branch and file exist, compare
50-
if git diff --quiet origin/exclusions -- exclusions.txt; then
50+
if git diff --quiet origin/exclusions -- false_positive_exclusions.txt; then
5151
echo "exclusions_changed=false" >> "$GITHUB_OUTPUT"
5252
else
5353
echo "exclusions_changed=true" >> "$GITHUB_OUTPUT"
@@ -71,10 +71,12 @@ jobs:
7171
git config user.name "Paul Pfeister (automation)"
7272
git config user.email "[email protected]"
7373
74+
git stash push -m "stash false positive exclusion list" --include-untracked -- false_positive_exclusions.txt
75+
7476
git fetch origin exclusions || true # Allows creation of branch if deleted
7577
git checkout -B exclusions origin/exclusions || (git checkout --orphan exclusions && git rm -rf .)
7678
77-
git add false_positive_exclusions.txt
79+
git stash pop || true
7880
7981
git commit -m "auto: update exclusions list" || echo "No changes to commit"
8082
git push origin exclusions

0 commit comments

Comments
 (0)