Skip to content

Commit 1b0f7f5

Browse files
committed
Ensure to only scan selected directories
1 parent a4b20fd commit 1b0f7f5

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

.github/workflows/scripts/track_fixmes

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ comment="<!-- This comment is automatically generated by a GitHub Action. -->
2424
"
2525

2626
# Search for FIXME annotations in the codebase:
27-
for file in $(find . -type f); do
28-
# A maximum of 65535 characters can be included in a GitHub comment body. If we exceed this limit, we stop searching for annotations:
29-
if [ ${#comment} -gt 65535 ]; then
30-
break
31-
fi
27+
for file in $(find bin dist docs tools etc examples lib test tools -type f); do
3228
fixme=$(grep -i -n "FIXME:" $file) || true
3329
if [ -n "$fixme" ]; then
30+
# Since a maximum of 65,535 characters can be included in a GitHub comment body, we break out of the loop if the comment body would exceed this limit.
31+
if [ $(( ${#comment} + ${#fixme} )) -gt 65535 ]; then
32+
break
33+
fi
3434
lineNumber=$(echo $fixme | cut -d ":" -f 1)
3535
lineContent=$(echo $fixme | cut -d ":" -f 2-)
3636
comment="$comment

.github/workflows/scripts/track_todos

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ comment="<!-- This comment is automatically generated by a GitHub Action. -->
2424
"
2525

2626
# Search for TODO annotations in the codebase:
27-
for file in $(find . -type f); do
28-
# A maximum of 65535 characters can be included in a GitHub comment body. If we exceed this limit, we stop searching for annotations:
29-
if [ ${#todos} -gt 65535 ]; then
30-
break
31-
fi
27+
for file in $(find bin dist docs tools etc examples lib test tools -type f); do
3228
todo=$(grep -i -n "TODO:" $file) || true
3329
if [ -n "$todo" ]; then
30+
# Since a maximum of 65,535 characters can be included in a GitHub comment body, we break out of the loop if the comment body would exceed this limit.
31+
if [ $(( ${#comment} + ${#todo} )) -gt 65535 ]; then
32+
break
33+
fi
3434
lineNumber=$(echo $todo | cut -d ":" -f 1)
3535
lineContent=$(echo $todo | cut -d ":" -f 2-)
3636
comment="$comment

0 commit comments

Comments
 (0)