gh icon indicating copy to clipboard operation
gh copied to clipboard

Add flag to automatically get body of the last commit to define it as the message of the Pull Request being submitted

Open pragmaticivan opened this issue 6 years ago • 5 comments

Often I submit pull requests with blank messages because the message was already defined in the commit. I would like to have a flag that would automatically split the last commit message into Title + Body and set its body as the PR message.

pragmaticivan avatar Apr 19 '18 15:04 pragmaticivan

@pragmaticivan Sounds interesting. What do you mean "Body"?

Do you mean using the initial message from the last commit as the PR title?

And then using the extended description from a commit as the PR description?

When I say "extended description" I mean something like this:

git commit -m "Title" -m "Description .........."

protoEvangelion avatar Apr 20 '18 22:04 protoEvangelion

So imagine that it's a commit:

My title is here


* Description of my commit 1
* Description of my commit 2

If you follow Git commit standard for messages, The first line of commit can be the title of the PR = My title is here

And the rest of the body can be the description of the PR:

* Description of my commit 1
* Description of my commit 2

pragmaticivan avatar Apr 20 '18 22:04 pragmaticivan

Here's an example of a Commit that can become a PR:

[123] fixing node gh weird issue

Fixes #123

## Why is this change necessary?
Because it's not working
## How does it address the issue?
Fixing the bug
## What side effects does this change have?
Not really ;/

pragmaticivan avatar Apr 20 '18 22:04 pragmaticivan

[123] fixing node gh weird issue becomes the title of the PR, and the rest becomes the description of the PR.

pragmaticivan avatar Apr 20 '18 22:04 pragmaticivan

Thanks for the clear examples!

This definitely seems like a good standard to follow. I will try to get this prioritized once we have more bandwidth to implement new features.

Thanks for the great suggestion :smile:

protoEvangelion avatar May 04 '18 00:05 protoEvangelion