Something went wrong. Try again.
Neovim plugin for working with Github pull request comments
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132local GhPrCommand = {}
local function handle_comments_command() local gh = require('gh-pr.github') local ui = require('gh-pr.ui')
ui.pr_comments = gh.get_pr_comments()
local files, count = ui.create_ui_list()
if count == 0 then vim.print("No comments on Github PR.") return end local window = ui.create_floating_window(gh.pr_data) vim.api.nvim_buf_set_lines(window.buf, 0, -1, false, files)end
local function handle_clear_command() local ui = require('gh-pr.ui') ui.clear_namespace_in_curr_buf()end
function GhPrCommand.setup() vim.api.nvim_create_user_command('GhPrComments', handle_comments_command, { force = true }) vim.api.nvim_create_user_command('GhPrCommentsClear', handle_clear_command, { force = true })end
return GhPrCommand