Skip to content

Commit cf2b4cc

Browse files
committed
Break out of loop once too long
1 parent 58601b7 commit cf2b4cc

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.github/workflows/scripts/track_fixmes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ fixmes=""
2121

2222
# Search for FIXME annotations in the codebase:
2323
for file in $(find . -type f); do
24+
# A maximum of 65535 characters can be included in a GitHub comment body. If we exceed this limit, we stop searching for annotations:
25+
if [ ${#fixmes} -gt 65535 ]; then
26+
break
27+
fi
2428
fixme=$(grep -i -n "FIXME:" $file) || true
2529
if [ -n "$fixme" ]; then
2630
lineNumber=$(echo $fixme | cut -d ":" -f 1)

.github/workflows/scripts/track_todos

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ todos=""
2121

2222
# Search for TODO annotations in the codebase:
2323
for file in $(find . -type f); do
24+
# A maximum of 65535 characters can be included in a GitHub comment body. If we exceed this limit, we stop searching for annotations:
25+
if [ ${#todos} -gt 65535 ]; then
26+
break
27+
fi
2428
todo=$(grep -i -n "TODO:" $file) || true
2529
if [ -n "$todo" ]; then
2630
lineNumber=$(echo $todo | cut -d ":" -f 1)

0 commit comments

Comments
 (0)