Skip to content

Commit

Permalink
squash
Browse files Browse the repository at this point in the history
  • Loading branch information
Drew-Daniels committed Oct 12, 2024
1 parent 2d183c5 commit 98e262a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lua/octo/navigation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ function M.open_in_browser(kind, repo, number)
local bufnr = vim.api.nvim_get_current_buf()
local buffer = octo_buffers[bufnr]
if not buffer then
return
local owner_repo = utils.get_remote_name()
if not owner_repo then
utils.error "No remote repository found"
return
end
cmd = string.format("gh repo view --web %s", owner_repo)
return pcall(vim.cmd, "silent !" .. cmd)
end
if buffer:isPullRequest() then
cmd = string.format("gh pr view --web -R %s/%s %d", remote, buffer.repo, buffer.number)
Expand Down

0 comments on commit 98e262a

Please sign in to comment.