Skip to content

fix: change counting logic for case of zero changes #461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 25, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ runs:
# If "tf.diff.txt" exists, display it within a "diff" block, truncated for character limit.
if [[ -s tf.diff.txt ]]; then
# Get count of lines in "tf.diff.txt" which do not start with "# ".
diff_count=$(grep --invert-match '^# ' tf.diff.txt | wc --lines)
diff_count=$({ grep --invert-match '^# ' tf.diff.txt || true; } | wc --lines)
if [[ $diff_count -eq 1 ]]; then diff_change="change"; else diff_change="changes"; fi

# Parse diff of changes, truncated for character limit.
Expand Down
Loading