Closed aaronmcadam closed 11 months ago
Looks like there is some logic already attempting to get a default title, perhaps it just needs updated? https://github.com/pwntester/octo.nvim/blob/e933611c74cb735c00d0db8ca94533bec1444bf0/lua/octo/commands.lua#L905
Looks like there is some logic already attempting to get a default title, perhaps it just needs updated?
Yeah, I know I saw it work once or twice before, but 99% of the time, it fails to get a default title.
According to this, it should already be taking the last commit: https://github.com/pwntester/octo.nvim/blob/e933611c74cb735c00d0db8ca94533bec1444bf0/lua/octo/commands.lua#L891C33-L891C33
ahh running the same git command locally, I get:
❯ git log -1 --pretty=%B
error: cannot run difftastic: No such file or directory
organise imports skip-ci
So the pretty formatted is failing to find my diff tool (difftastic)
According to this, it should already be taking the last commit: https://github.com/pwntester/octo.nvim/blob/e933611c74cb735c00d0db8ca94533bec1444bf0/lua/octo/commands.lua#L891C33-L891C33
Interesting. If you were to normally open it in Github, most of the time for me it tends to use the first commit I believe, which is why my first commit tends to be the conventional commits
title that I intend my PR to have as well as my squash-merge since I tend to then remove most of the body (although that is a different use case that I think someone has created an issue ticket as well for).
So fixing my git log command didn't help. I see the following messages when trying to create a new PR:
That OctoEditable xxx cleared
looks suspect to me.
Fixed it, a little pair programming with @aaronmcadam
Thanks for the fix folks. Appreciate it!
Issue Description
Type: feature request
Describe what happened (or what feature you want)
I'd like
pr create
to use a default title of the latest or first commit like thegh
CLI works. This would save me a bit of time because I often need to rewrite the title based on a commit message.Describe what you expected to happen
I expected the title to default to my latest or first commit message.
How to reproduce it (as minimally and precisely as possible)
Octo pr create
Tell us your environment
OS: macOS 14.1 23B74 arm64 Host: Mac14,6 Kernel: 23.1.0 Uptime: 23 hours, 37 mins Packages: 106 (brew) Shell: fish 3.6.1 Resolution: 3008x1692, 3008x1692 DE: Aqua WM: yabai Terminal: zellij CPU: Apple M2 Max GPU: Apple M2 Max Memory: 9036MiB / 98304MiB
Anything else we need to know?