gh-dash icon indicating copy to clipboard operation
gh-dash copied to clipboard

Add PR approval

Open jgrumboe opened this issue 1 year ago • 16 comments

Is your feature request related to a problem? Please describe. Sometimes when bumping Terraform module versions, I get a bunch of renovate PRs. I would like to quickly approve them from within dash.

Describe the solution you'd like I would like to add "Approve" as a keybinding like "Merge" (https://github.com/dlvhdr/gh-dash/pull/168). Probably it popups with a message dialog to enter a comment.

Describe alternatives you've considered Currently I created my own keybinding.

Additional context I would like to implement it in the context of #hacktoberfest which is just around the corner.

jgrumboe avatar Sep 15 '22 12:09 jgrumboe

cool yeah that's something I definitely want! I didn't implement it yet as I needed to think more on the UX of it. Reviewing a PR with gh pr review needs flags specifying approving/rejecting and a message body. I thought I could implement an generic input mechanism similar to vim's vim.ui.select.

Something like this: image

dlvhdr avatar Sep 15 '22 13:09 dlvhdr

Would it make sense to use something like the modal window from tview (https://github.com/rivo/tview/wiki/Modal) ?

jgrumboe avatar Sep 15 '22 15:09 jgrumboe

I'm not sure that'll work with bubbletea, but if it were to work, do you know how much that'll add to the binary size?

dlvhdr avatar Sep 15 '22 17:09 dlvhdr

No idea. Honestly, I'm more or less a copy/paste "dev" as my background is more Ops than Dev. 🙂

But as said I would like to try a PR for #hacktoberfest. Are you fine with that?

jgrumboe avatar Sep 15 '22 17:09 jgrumboe

Yeah sure, give it a try

dlvhdr avatar Sep 15 '22 17:09 dlvhdr

After a quick search I know now that bubbletea is already a TUI lib 💡 and that https://github.com/erikgeiser/promptkit could be a good fit. I will explore in the bubbles field.

jgrumboe avatar Sep 15 '22 18:09 jgrumboe

Yes check out https://github.com/charmbracelet/bubbles

dlvhdr avatar Sep 15 '22 18:09 dlvhdr