Skip to content
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

fix(governance): Fix list-new-commits.sh #2639

Merged
merged 2 commits into from
Nov 15, 2024
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
8 changes: 4 additions & 4 deletions testnet/tools/nns-tools/list-new-commits.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ list_new_canister_commits() {
)

INTERESTING_COMMITS=$(
grep -v -E ' .{10} (chore|refactor|test)\b' <<<"$NEW_COMMITS" \
grep -v -E ' [0-9a-z]{10,12} (chore|refactor|test)\b' <<<"$NEW_COMMITS" \
|| true
)

Expand All @@ -75,12 +75,12 @@ list_new_canister_commits() {
if [[ "${INTERESTING_COMMIT_COUNT}" -gt 0 || "${COMMIT_COUNT}" -ge 5 ]]; then
print_green "${HEADING}"
else
print_cyan "${HEADING}"
print_light_gray "${HEADING}"
fi

while IFS= read -r COMMIT_MESSAGE; do
if [[ $(echo "$COMMIT_MESSAGE" | grep -v -E ' .{10} (chore|refactor|test)\b' | wc -l) -gt 0 ]]; then
print_blue "${COMMIT_MESSAGE}"
if echo "$COMMIT_MESSAGE" | grep -v -E ' [0-9a-z]{10,12} (chore|refactor|test)\b' >/dev/null; then
print_green "${COMMIT_MESSAGE}"
else
print_light_gray "${COMMIT_MESSAGE}"
fi
Expand Down