This simple Neovim plugin is for users to more easily track authored PRs and reviews requested for any github repo.
- List all authored PRs in a github repo
- List all reviews requested in a github repo
- Open specific PR in the browser by hitting
<CR>
- Checkout PR branch with
gco
Packer:
use {
'changangus/github_pulls.nvim',
config = function()
require('github_pulls').setup({
username = 'YOUR_GH_USERNAME'
})
end
}
-
Create a github personal access token, instructions can be found here
-
Globally export an environment variable named
GH_TOKEN
and assign your new token to the variable -
Make sure you have your username set in the config
-
Create keymaps to call the functions:
vim.keymap.set("n", "YOUR KEYMAP", ":lua require('github_pulls.ui').toggle_pr_menu()<CR>", { noremap = true, silent = true })
vim.keymap.set("n", "YOUR KEYMAP", ":lua require('github_pulls.ui').toggle_reviews_menu()<CR>", { noremap = true, silent = true })