Skip to content

Commit

Permalink
fix: fix 'edit' actions documented arguments
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ldelossa committed Jan 31, 2025
1 parent 1d2982f commit 3f6d22a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lua/octo/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -829,9 +829,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
Expand Down

0 comments on commit 3f6d22a

Please sign in to comment.