From 9be38e3b00bee76815ad00f0a4bcda7a924fadd5 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Sat, 28 Mar 2026 12:46:12 -0400 Subject: [PATCH] ci: resolve lua typechecks --- lua/forge/codeberg.lua | 2 -- lua/forge/github.lua | 2 -- lua/forge/gitlab.lua | 2 -- lua/forge/init.lua | 21 +++++++++++++++------ lua/forge/pickers.lua | 10 +++++----- 5 files changed, 20 insertions(+), 17 deletions(-) diff --git a/lua/forge/codeberg.lua b/lua/forge/codeberg.lua index 7925588..9234821 100644 --- a/lua/forge/codeberg.lua +++ b/lua/forge/codeberg.lua @@ -14,8 +14,6 @@ local M = { }, } ----@param kind string ----@param state string ---@param state string ---@return string[] function M:list_pr_json_cmd(state) diff --git a/lua/forge/github.lua b/lua/forge/github.lua index 39b91a7..5461387 100644 --- a/lua/forge/github.lua +++ b/lua/forge/github.lua @@ -19,8 +19,6 @@ local function nwo() return url:match('github%.com/(.+)$') or '' end ----@param kind string ----@param state string ---@param state string ---@return string[] function M:list_pr_json_cmd(state) diff --git a/lua/forge/gitlab.lua b/lua/forge/gitlab.lua index 15baf6c..576e54d 100644 --- a/lua/forge/gitlab.lua +++ b/lua/forge/gitlab.lua @@ -14,8 +14,6 @@ local M = { }, } ----@param kind string ----@param state string ---@param state string ---@return string[] function M:list_pr_json_cmd(state) diff --git a/lua/forge/init.lua b/lua/forge/init.lua index 4b2771d..3d22e43 100644 --- a/lua/forge/init.lua +++ b/lua/forge/init.lua @@ -633,7 +633,11 @@ function M.format_check(check) end end end - return hl(group, icon) .. ' ' .. pad_or_truncate(name, widths.name) .. ' ' .. hl('ForgeDim', elapsed) + return hl(group, icon) + .. ' ' + .. pad_or_truncate(name, widths.name) + .. ' ' + .. hl('ForgeDim', elapsed) end ---@param run forge.CIRun @@ -659,13 +663,18 @@ function M.format_run(run) local age = relative_time(run.created_at) if run.branch ~= '' then local name_w = widths.name - widths.branch + 10 - return hl(group, icon) .. ' ' - .. pad_or_truncate(run.name, name_w) .. ' ' - .. hl('ForgeBranch', pad_or_truncate(run.branch, widths.branch)) .. ' ' + return hl(group, icon) + .. ' ' + .. pad_or_truncate(run.name, name_w) + .. ' ' + .. hl('ForgeBranch', pad_or_truncate(run.branch, widths.branch)) + .. ' ' .. hl('ForgeDim', ('%-6s'):format(event) .. ' ' .. age) end - return hl(group, icon) .. ' ' - .. pad_or_truncate(run.name, widths.name) .. ' ' + return hl(group, icon) + .. ' ' + .. pad_or_truncate(run.name, widths.name) + .. ' ' .. hl('ForgeDim', ('%-6s'):format(event) .. ' ' .. age) end diff --git a/lua/forge/pickers.lua b/lua/forge/pickers.lua index d31486b..5d12663 100644 --- a/lua/forge/pickers.lua +++ b/lua/forge/pickers.lua @@ -678,7 +678,7 @@ function M.pr(state, f) name = 'checkout', fn = function(selected) with_pr_num(selected, function(num) - pr_actions(f, num)._by_name.checkout() + pr_actions(f, num)._by_name['checkout']() end) end, }, @@ -686,7 +686,7 @@ function M.pr(state, f) name = 'diff', fn = function(selected) with_pr_num(selected, function(num) - pr_actions(f, num)._by_name.diff() + pr_actions(f, num)._by_name['diff']() end) end, }, @@ -694,7 +694,7 @@ function M.pr(state, f) name = 'worktree', fn = function(selected) with_pr_num(selected, function(num) - pr_actions(f, num)._by_name.worktree() + pr_actions(f, num)._by_name['worktree']() end) end, }, @@ -702,7 +702,7 @@ function M.pr(state, f) name = 'ci', fn = function(selected) with_pr_num(selected, function(num) - pr_actions(f, num)._by_name.ci() + pr_actions(f, num)._by_name['ci']() end) end, }, @@ -718,7 +718,7 @@ function M.pr(state, f) name = 'manage', fn = function(selected) with_pr_num(selected, function(num) - pr_actions(f, num)._by_name.manage() + pr_actions(f, num)._by_name['manage']() end) end, },