feat(fetch_pr): Introdue the fetch_pr command that allows to pick open

Pull requests from github and import them locally
This commit is contained in:
NicolasGB
2026-02-24 18:18:59 +01:00
parent d6aa067854
commit bbba4051c8
3 changed files with 144 additions and 1 deletions
+5 -1
View File
@@ -51,7 +51,8 @@ end
--- @param error_prefix string|nil Optional error message prefix
--- @param input string|nil Optional input to pass to stdin
--- @param silent boolean|nil Optional to silent the notification
function M.execute_command_async(cmd, on_success, error_prefix, input, silent)
--- @param on_error function|nil Callback on error, receives ouptut as the parameter
function M.execute_command_async(cmd, on_success, error_prefix, input, silent, on_error)
local output_lines = {}
local job_id = vim.fn.jobstart({ "sh", "-c", cmd }, {
@@ -85,6 +86,9 @@ function M.execute_command_async(cmd, on_success, error_prefix, input, silent)
if not silent then
vim.notify(error_message, vim.log.levels.ERROR, { title = "JJ" })
end
if on_error then
on_error(output)
end
end
end,
})