Fix pi-review.sh commit subject to respect 72 char limit

t-289·WorkTask·
·
·
·Omni/Ide.hs
Created1 month ago·Updated1 month ago

Description

Edit

gitlint enforces 72 char max on commit subject line. Currently pi-review constructs: $NAMESPACE: $TITLE

Which can exceed 72 chars for long task titles.

Solution

Truncate the subject line to 72 chars:

SUBJECT="$COMMIT_PREFIX: $TITLE"
if [ ${#SUBJECT} -gt 72 ]; then
  SUBJECT="${SUBJECT:0:69}..."
fi
git commit -m "$SUBJECT" -m "Automated via pi-review." --trailer "Task-Id: $TASK_ID"

This keeps the full title visible in the body via Task-Id lookup, but satisfies gitlint.

Update both places

  • Dry-run echo
  • Actual commit

Timeline (2)

🔄[human]Open → InProgress1 month ago
🔄[human]InProgress → Done1 month ago