The process of opening a pull-request and starting a review was a little disconnected, as we had keymaps to almost everything we can do with a pull-request, except for starting a review.
I followed the project standard and created named mappings that mirror the configuration keys and added them to:
Pull request buffer (pull_reqest)
The diff-view of the Review (review_diff)
The review pane (file_pane)
The new commands are:
Command
Binding
review_start
<leader>vs
review_resume
<leader>vr
submit_review
<leader>vs
discard_review
<leader>vd
Describe how to verify it
Start and resume a PR:
Open a Pull-Request
press <leader>vs to start a review
press Ctrl+c to close the review
press <leader>vr to resume the review
Submit or discard a PR
Open a Pull-request
press <leader>vs to start a review
from the diff-view or the files pane, press <leader>vs to open the submit modal
Run the command :q to close it
press <leader>vd to discard the review, you should see a prompt asking to confirm.
Special notes for reviews
Aside from the keybindings, this PR also fixed the Ctrl+C to close the review, that wasn't working, as it wasn't passing the current tab as an argument to the close() function, so the key press was just ignored.
Describe what this PR does / why we need it
The process of opening a pull-request and starting a review was a little disconnected, as we had keymaps to almost everything we can do with a pull-request, except for starting a review.
https://github.com/pwntester/octo.nvim/assets/4634613/68458e0b-d791-4ab4-b568-3ef8532142ac
Describe how you did it
I followed the project standard and created named mappings that mirror the configuration keys and added them to:
pull_reqest
)review_diff
)file_pane
)The new commands are:
review_start
<leader>vs
review_resume
<leader>vr
submit_review
<leader>vs
discard_review
<leader>vd
Describe how to verify it
Start and resume a PR:
<leader>vs
to start a reviewCtrl+c
to close the review<leader>vr
to resume the reviewSubmit or discard a PR
<leader>vs
to start a review<leader>vs
to open the submit modal:q
to close it<leader>vd
to discard the review, you should see a prompt asking to confirm.Special notes for reviews
Aside from the keybindings, this PR also fixed the
Ctrl+C
to close the review, that wasn't working, as it wasn't passing the current tab as an argument to theclose()
function, so the key press was just ignored.