di-sukharev / opencommit

Generate awesome commits with AI in 1 second 🤯🔫
https://www.npmjs.com/package/opencommit
MIT License
5.81k stars 304 forks source link

[Feature Request] Pull request title based on files diff #26

Open AdrielBento opened 1 year ago

AdrielBento commented 1 year ago

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
di-sukharev commented 1 year ago

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?

github-actions[bot] commented 1 year ago

Stale issue message