Add CI job to check for deleted files (#8727)

Co-Authored-By: Michael Sproul <michael@sigmaprime.io>

Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>
This commit is contained in:
Michael Sproul
2026-02-27 08:05:57 +11:00
committed by GitHub
parent a1ef265c9e
commit 2f43d234d8
3 changed files with 30 additions and 0 deletions

1
.github/CODEOWNERS vendored
View File

@@ -1,3 +1,4 @@
/beacon_node/network/ @jxs
/beacon_node/lighthouse_network/ @jxs
/beacon_node/store/ @michaelsproul
/.github/forbidden-files.txt @michaelsproul

7
.github/forbidden-files.txt vendored Normal file
View File

@@ -0,0 +1,7 @@
# Files that have been intentionally deleted and should not be re-added.
# This prevents accidentally reviving files during botched merges.
# Add one file path per line (relative to repo root).
beacon_node/beacon_chain/src/otb_verification_service.rs
beacon_node/store/src/partial_beacon_state.rs
beacon_node/store/src/consensus_context.rs

View File

@@ -72,6 +72,27 @@ jobs:
steps:
- name: Check that the pull request is not targeting the stable branch
run: test ${{ github.base_ref }} != "stable"
forbidden-files-check:
name: forbidden-files-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check for forbidden files
run: |
if [ -f .github/forbidden-files.txt ]; then
status=0
while IFS= read -r file || [ -n "$file" ]; do
# Skip comments and empty lines
[[ "$file" =~ ^#.*$ || -z "$file" ]] && continue
if [ -f "$file" ]; then
echo "::error::Forbidden file exists: $file"
status=1
fi
done < .github/forbidden-files.txt
exit $status
fi
release-tests-ubuntu:
name: release-tests-ubuntu
needs: [check-labels]
@@ -430,6 +451,7 @@ jobs:
needs: [
'check-labels',
'target-branch-check',
'forbidden-files-check',
'release-tests-ubuntu',
'beacon-chain-tests',
'op-pool-tests',