-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Description
Describe the feature or problem you’d like to solve
When using git pr merge <url> --body "…", the resulting commit has a first line that consists of the PR title and the PR number, and it seems there is no way to customize this (while the web UI allows us to change this line just like the rest of the body).
Proposed solution
I can think of different solution, from the most convenient for my use case to the least:
- Add a
--messageand--message-fileoptions (cannot be used with--bodynot--body-file):
git pr merge <url> --message "…". - Add a separate
--commit-titleoption, separated from the rest of the body, like the web UI and the REST API does:
git pr merge <url> --commit-title "…" --body "…".
Additional context
In nodejs/node repo, we have some peculiar format rules for our commit messages. For this reason, the process to land a PR is far from ideal: we pull the commit from the contributor PR locally, rebase, add the metadata, force-push to the PR branch, wait a while for GitHub to sync, and finally push to master.
Ideally, we could use the Squash and Merge feature, but using the web UI is tedious, so the CLI would really be ideal.
EDIT: According to GitHub REST API docs, it's called commit_title, so updating my proposal to reflet that.