opencommit icon indicating copy to clipboard operation
opencommit copied to clipboard

[Feature Request] Pull request title based on files diff

Open AdrielBento opened this issue 2 years ago • 2 comments

Context

I know that the purpose of the CLI is to help create commit messages, but it would be nice to have the option to suggest pull request titles based on differences in modified files.

In this example, the user should copy the suggested title, I don't think there's a simple way to automate this.

Example

➜ opencommit --pull-request
┌  open-commit
│
◇  1 staged files:
  example-repo/test.js
│
◇  📝 Commit message generated
│
└  Commit message:
——————————————————
* feat(test.js): add test file
——————————————————

│
◇  Confirm the commit message
│  Yes
│
└  ✔ successfully committed

│
└  [main] * feat(test.js): add test file
 1 files changed, 1 insertions(+), 0 deletions(-)

│
◇  📖  Pull Request title generated
│
└  Pull Request title:
——————————————————
* feat: Create sample test file
——————————————————

│
◇  Do you want to run `git push`?
│  Yes
│
◇  ✔ successfully pushed all commits

AdrielBento avatar Mar 16 '23 13:03 AdrielBento

thats great, i think just generating PR title of git log --oneline and no commit message when you run opencommit --prt is less confusing. WDYT?

di-sukharev avatar Mar 16 '23 14:03 di-sukharev

Stale issue message

github-actions[bot] avatar Apr 25 '23 21:04 github-actions[bot]