From 781545b926d9b8db37f149022eb349739ed5ca33 Mon Sep 17 00:00:00 2001 From: Louis DeLosSantos Date: Sun, 2 Feb 2025 08:25:22 -0500 Subject: [PATCH] fix: fix 'edit' actions documented arguments (#826) At some point the documentation for editing and issue and a pr drafted from the code. Update `get_repo_number_from_varargs` to reflect the documentation. The documentation says `Octo pr [number] {repo}` However, the code expected `Octo pr {repo} [number]`. Fix this confusion by conforming to the documentation. Signed-off-by: ldelossa Co-authored-by: Will Dean <57733339+wd60622@users.noreply.github.com> --- lua/octo/utils.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/octo/utils.lua b/lua/octo/utils.lua index 869d4ff4..b8ad3bd5 100644 --- a/lua/octo/utils.lua +++ b/lua/octo/utils.lua @@ -840,9 +840,9 @@ function M.get_repo_number_from_varargs(...) repo = M.get_remote_name() number = tonumber(args[1]) elseif args.n == 2 then - -- eg: Octo issue pwntester/octo.nvim 1 - repo = args[1] - number = tonumber(args[2]) + -- eg: Octo issue 1 pwntester/octo.nvim + repo = args[2] + number = tonumber(args[1]) else M.error "Unexpected arguments" return