Skip to content

Commit 419c945

Browse files
committed
preview_comment.yaml: Remove namespaces if too long
1 parent e842a10 commit 419c945

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/preview_comment.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,14 @@ jobs:
4242
4343
echo -e "$md_change_list\n$par_change_list"
4444
45-
if [[ -z "$md_change_list$par_change_list" ]] ; then
45+
if [[ $change_count -gt $file_limit ]]; then
46+
par_change_list=$(echo "$par_change_list" | grep -v namespaces)
47+
change_count=$(( $(echo "$md_change_list" | wc -l) + $(echo "$par_change_list" | wc -l) ))
48+
fi
49+
50+
if [[ -z "$md_change_list$par_change_list" ]]; then
4651
comment="Preview of modified files: no change to preview."
47-
elif [[ $change_count -gt $file_limit ]] ; then
52+
elif [[ $change_count -gt $file_limit ]]; then
4853
comment="Preview of modified files: Too many files modified in a single PR, preview link list is skipped. ($change_count files > $file_limit)"
4954
else
5055
comment="# Preview of modified files"

0 commit comments

Comments
 (0)