File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ name : " Check for TODOs"
2+
3+ on :
4+ pull_request :
5+
6+ jobs :
7+ check-todos :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - name : Checkout code
11+ uses : actions/checkout@v4
12+
13+ - name : Scan for TODO strings
14+ run : |
15+ echo "Scanning codebase for TODOs..."
16+
17+ git grep -nE "TODO" -- . ':(exclude).github/workflows/*' > todos_found.txt || true
18+
19+ if [ -s todos_found.txt ]; then
20+ echo "❌ ERROR: Found TODOs in the following files:"
21+ echo "-------------------------------------------"
22+
23+ while IFS=: read -r file line content; do
24+ echo "::error file=$file,line=$line::TODO found at $file:$line - must be resolved before merge:%0A$content"
25+ done < todos_found.txt
26+
27+ echo "-------------------------------------------"
28+ echo "Please resolve these TODOs or track them in an issue before merging."
29+
30+ exit 1
31+ else
32+ echo "✅ No TODOs found. Codebase is clean!"
33+ exit 0
34+ fi
You can’t perform that action at this time.
0 commit comments