Skip to content

Commit

Permalink
Some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
LoipesMas committed Oct 9, 2022
1 parent 54c16c8 commit 9fa40f4
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions lua/octo/commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -721,20 +721,23 @@ function M.create_pr(is_draft)
local remotes = utils.get_all_remotes()
local remote_entries = {"Select base repo,",}
for idx, remote in ipairs(remotes) do
table.insert(remote_entries, idx .. ". " .. remote.repo)
table.insert(remote_entries, idx .. ". " .. remote.repo)
end
local remote_idx = vim.fn.inputlist(remote_entries)
if remote_idx < 1 then
utils.notify("Something went wrong", 1)
return
utils.notify("Aborting PR creation", 2)
return
elseif remote_idx > #remotes then
utils.notify("Invaild index.", 2)
return
end
repo = remotes[remote_idx].repo
else
repo = utils.get_remote_name()
if not repo then
utils.notify("Cant find repo name", 1)
return
end
repo = utils.get_remote_name()
if not repo then
utils.notify("Cant find repo name", 1)
return
end
end


Expand Down

0 comments on commit 9fa40f4

Please sign in to comment.