This is my first Vim plugin so expect a non-idiomatic structure.
This plugin was inspired by AGhost-7/critiq.vim and codegram/vim-codereview.
The reason for creating my own is to match my workflow and be able to add features on the fly as needed. If you are looking for a more general purpose tool I recommend trying AGhost-7/critiq.vim
Save your github access token as the only line in ~/.pullreview
.
In a git project, run :PullReviewList
.
In the PullRequest (diff) view lines that have comments will have a symbol in the line gutter. Comment chains that you are not the last to have commented on will have their line gutter symbol highlighted. If you were the last person to comment on the comment chain then the line gutter symbol will not be highlighted.
All mappings are in normal mode.
Map | Action |
---|---|
r |
Close and reopen the PullRequestList |
<CR> |
Open the PullRequest in a new tab1 |
Map | Action |
---|---|
<CR> |
Open the CommentChain for the current line |
c |
Open a split to write a NewComment for the current line. Leave insert mode and press <CR> to submit the comment to Github. |
L |
Open a split to modify Labels |
o |
Open the file for the current line2 |
<C-p> |
Go to previous line with a comment |
<C-n> |
Go to next line with a comment |
| Map | Action |
| <CR>
| Toggle the label on the current line |
Map | Action |
---|---|
<CR> |
Post comment |
1 Must be on a line containing a pull request title. 2 This is going to show you your local version of the file.