commit summaries
@claude why is this commit message so absurdly long? how can we change our settings so the messages are reasonable? https://github.com/max-sixty/worktrunk/commit/670d6cc7d2c66bf7a14b3da323a21d9ff0da6c04
Claude finished @max-sixty's task in 2m 8s —— View job
Investigating commit message length
- [x] Look at the commit message in question
- [x] Find commit message generation settings/code
- [x] Provide recommendations for shorter messages
Answer
The commit 670d6cc7 is 710 lines long because it's a GitHub squash merge (committer: GitHub <[email protected]>). This is GitHub's default behavior when using "Squash and merge" on a PR — it concatenates every individual commit message from the PR into the squash commit body. PR #963 had many sub-commits (system config, approvals refactor, shell fixes, summary tab, CI improvements, etc.), so the merged message is enormous.
This has nothing to do with worktrunk's LLM commit generation ([commit.generation]). The wt squash template already requests "Subject line under 50 chars" with a brief body paragraph.
How to fix it
This is a GitHub repository setting, not a worktrunk setting:
- Go to Settings → General → Pull Requests in the GitHub repo
- Under "Allow squash merging", click "Default to pull request title" (instead of "Default to pull request title and commit details")
- "Default to pull request title" → uses PR title as subject, PR body (description) as commit body
- "Default to pull request title and description" → same but with the PR description
- "Default to pull request title and commit details" → the current setting, which dumps all commit messages
Alternatively, whoever merges the PR can manually edit the squash commit message in the GitHub UI before clicking "Confirm squash and merge" — but changing the default is the more scalable fix.
If you want wt merge (the CLI command) to handle squash merges instead, it already uses the LLM squash template which produces clean single-paragraph messages. The long messages only happen through GitHub's web UI merge button.