Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add keymaps for start, resume, submit and discard Reviews #498

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

carlos-algms
Copy link
Contributor

@carlos-algms carlos-algms commented Feb 13, 2024

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.

review-keymaps.mp4

Describe how you did it

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:

  1. Open a Pull-Request
  2. press <leader>vs to start a review
  3. press Ctrl+c to close the review
  4. press <leader>vr to resume the review

Submit or discard a PR

  1. Open a Pull-request
    1. press <leader>vs to start a review
  2. from the diff-view or the files pane, press <leader>vs to open the submit modal
  3. Run the command :q to close it
  4. 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.

@pwntester
Copy link
Owner

LGTM, Thanks for the contribution!

@pwntester pwntester merged commit 9190a1a into pwntester:master Feb 15, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants