node-gh / gh

(DEPRECATED) GitHub CLI made with NodeJS. Use the official https://cli.github.com/ instead.
http://nodegh.io
Other
1.71k stars 217 forks source link

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

Open pragmaticivan opened 6 years ago

pragmaticivan commented 6 years ago

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.

protoEvangelion commented 6 years ago

@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 .........."

pragmaticivan commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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

protoEvangelion commented 6 years ago

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: