Skip to content

Commit

Permalink
stylua
Browse files Browse the repository at this point in the history
  • Loading branch information
Alvaro Muñoz committed Jan 15, 2024
1 parent e132d5d commit 153a516
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lua/octo/gh/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ function M.get_user_name(remote_hostname)
local stdout = table.concat(job:result(), "\n")
-- Newer versions of the gh cli have a different message. See #467
local name_err = string.match(stderr, "Logged in to [^%s]+ as ([^%s]+)")
or string.match(stderr, "Logged in to [^%s]+ account ([^%s]+)")
or string.match(stderr, "Logged in to [^%s]+ account ([^%s]+)")
local name_out = string.match(stdout, "Logged in to [^%s]+ as ([^%s]+)")
or string.match(stdout, "Logged in to [^%s]+ account ([^%s]+)")
or string.match(stdout, "Logged in to [^%s]+ account ([^%s]+)")

if name_err then
return name_err
Expand Down
10 changes: 5 additions & 5 deletions lua/octo/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ function M.process_patch(patch)
for _, hunk in ipairs(hunk_strings) do
local header = vim.split(hunk, "\n")[1]
local found, _, left_start, left_length, right_start, right_length =
string.find(header, "^%s*%-(%d+),(%d+)%s+%+(%d+),(%d+)%s*@@")
string.find(header, "^%s*%-(%d+),(%d+)%s+%+(%d+),(%d+)%s*@@")
if found then
table.insert(hunks, hunk)
table.insert(left_ranges, { tonumber(left_start), math.max(left_start + left_length - 1, 0) })
Expand Down Expand Up @@ -1274,10 +1274,10 @@ function M.apply_mappings(kind, bufnr)
local conf = config.values
for action, value in pairs(conf.mappings[kind]) do
if
not M.is_blank(value)
and not M.is_blank(action)
and not M.is_blank(value.lhs)
and not M.is_blank(mappings[action])
not M.is_blank(value)
and not M.is_blank(action)
and not M.is_blank(value.lhs)
and not M.is_blank(mappings[action])
then
if M.is_blank(value.desc) then
value.desc = ""
Expand Down

0 comments on commit 153a516

Please sign in to comment.