gitlab.lua (412B)
1 local M = {} 2 3 local gitlab_issues = {} 4 5 M.section = { 6 title = 'Gitlab issues', 7 setup = function(_) 8 require('plenary.job'):new({ 9 command = 'glab', 10 args = {'mis', 'list', '-a', '@me'}, 11 on_exit = function(j, code) 12 if code > 0 then gitlab_issues = {} end 13 gitlab_issues = j:result() 14 end, 15 }):start() 16 end, 17 draw = function(_) return gitlab_issues end, 18 } 19 20 return M