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

t-289·WorkTask·
·
·
·Omni/Ide.hs
Created4 months ago·Updated4 months ago·pipeline runs →

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

Git Commits

7194f3c1Omni/Ide.hs: Fix pi-review.sh commit subject to respect 72 char limit
Ben Sima4 months ago1 files

Timeline (2)

🔄[human]Open → InProgress4 months ago
🔄[human]InProgress → Done4 months ago