git pr merge -s
should provide an option to customize commit title
#4645
Labels
enhancement
a request to improve CLI
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:
--message
and--message-file
options (cannot be used with--body
not--body-file
):git pr merge <url> --message "…"
.--commit-title
option, 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.The text was updated successfully, but these errors were encountered: