Skip to content

Commit 66f9a89

Browse files
committed
ci: add gate to prevent .received.txt files from being committed
Add a CI step that runs early in the pipeline (right after checkout) to detect any accidentally committed .received.txt snapshot files. These files should never be checked in — only .verified.txt files should be committed. Closes #4880
1 parent a2d5145 commit 66f9a89

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/dotnet.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@ jobs:
4040
with:
4141
fetch-depth: 0
4242

43+
- name: Check for .received.txt files
44+
shell: bash
45+
run: |
46+
if find . -name "*.received.txt" -not -path "./node_modules/*" | grep -q .; then
47+
echo "ERROR: .received.txt files found. These should not be committed."
48+
echo "Please replace them with .verified.txt files or remove them."
49+
find . -name "*.received.txt" -not -path "./node_modules/*"
50+
exit 1
51+
fi
52+
4353
- name: Setup .NET Framework
4454
if: matrix.os == 'windows-latest'
4555
uses: microsoft/setup-msbuild@v2

0 commit comments

Comments
 (0)