-- Issues assigned to the authenticated user across all their repos. local res = jarvis.system.exec( 'gh issue list --assignee @me --state open --json number,title,repository --limit 10' ) if not res or not res.success then return jarvis.cmd.error("gh CLI не отвечает.") end local stdout = res.stdout or "" local _, count = stdout:gsub('"number"%s*:', "") if count == 0 then return jarvis.cmd.ok("Тебе ничего не назначено.") end local titles = {} for title in stdout:gmatch('"title"%s*:%s*"([^"]+)"') do table.insert(titles, title) if #titles >= 3 then break end end local line = string.format("На вас %d issues. ", count) if #titles > 0 then line = line .. "Первые: " .. table.concat(titles, ". ") .. "." end return jarvis.cmd.ok(line)