Plugin to work with GitHub issues and PRs from Neovim. Just edit the issue description/comments and save it with :w
.
Modified description or comments are highlighted in the signcolumn.
Use your favourite plugin manager to install it. eg:
Plug 'pwntester/octo.nvim'
- Install GitHub CLI
- Install telescope.nvim for using the
ListXXX
commands which enables to fuzzy pick issues from a dropdown menu.
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
There is only an Octo <object> <action> [arguments]
command:
Object | Action | Arguments |
---|---|---|
issue | close | |
open | ||
create | [repo] | |
edit | [repo] | |
list | [repo] [key=value]* Available keys: author |assignee |mention |label |milestone |state |limit Mappings: <CR> : Edit issue<C-t> : Opens issue in web browser |
|
pr | list | [repo] [key=value]* Available keys: assignee |label |state |base |limit Mappings: <CR> : Edit PR<C-t> : Opens PR in web browser<C-o> : Checkout PR |
edit | [repo] | |
checkout | ||
commits | ||
files | ||
gist | list | [repo] [key=value]* Available keys: repo |public |secret Mappings: <CR> : Append Gist to buffer<C-t> : Opens Gist in web browser |
comment | add | |
delete | ||
label | add | |
delete | ||
assignees | add | |
delete | ||
reviewer | add | |
delete | ||
reaction | add | <+1|-1|eyes|laugh|confused|rocket|hooray> |
delete | <+1|-1|eyes|laugh|confused|rocket|hooray> |
- If repo is not provided, it will be derived from
<cwd>/.git/config
.
Examples:
Octo issue create
Octo issue create pwntester/octo.nvim
Octo comment add
Octo reaction add hooray
Octo issue edit pwntester/octo.nvim 1
Octo issue edit 1
Just edit the issue title, description or comments as a regular buffer and use :w(rite)
to sync the issue with GitHub.
<C-x><C-o>
: When cursor is located at text that matches #\d*
will popup a list of repo issues starting with the same id prefix.
Mapping | Description |
---|---|
<space>gi |
navigate to a local repo issue |
<space>ca |
add comment |
<space>cd |
delete comment |
<space>ic |
close issue |
<space>io |
reopen issue |
<space>il |
list open issues on same repo |
<space>co |
checkout pull request |
<space>cm |
list pull request commits |
<space>cf |
list pull request files |
<space>la |
add label |
<space>ld |
delete label |
<space>aa |
add assignee |
<space>ad |
delete assignee |
<space>va |
request reViewer |
<space>vd |
delete reViewer |
<space>rh |
add ❤️ reaction |
<space>rp |
add :hooray: reaction |
<space>re |
add 👀 reaction |
<space>rl |
add :laugh: reaction |
<space>rc |
add 😕 reaction |
<space>r+ |
add 👍 reaction |
<space>r- |
add 👎 reaction |
<space>rr |
add 🚀 reaction |
Name | Default |
---|---|
OctoNvimDirty |
ErrorMsg |
OctoNvimCommentHeading |
PreProc |
OctoNvimCommentUser |
Underlined |
OctoNvimIssueTitle |
PreProc |
OctoNvimIssueId |
Question |
OctoNvimIssueOpen |
MoreMsg |
OctoNvimIssueClosed |
ErrorMsg |
OctoNvimEmpty |
Comment |
OctoNvimFloat |
NormalNC |
All List
commands are taken from @windwp Telescope extension and adapted to edit issues.