feat: add Gitea actions workflow runs list and logs tools

This commit is contained in:
2026-08-15 12:14:56 +02:00
parent ec45a86c27
commit eac2a61452
2 changed files with 40 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
import { tool } from "@opencode-ai/plugin"
import { $ } from "bun"
export default tool({
description: "Get logs for a specific Gitea actions workflow run to diagnose failures",
args: {
runId: tool.schema.number().describe("Workflow run ID to get logs for"),
job: tool.schema.string().optional().describe("Specific job ID to view (if omitted, shows all jobs)"),
},
async execute(args) {
let cmd = [`tea`, `actions`, `runs`, `logs`]
if (args.job) cmd = [...cmd, `--job`, args.job]
cmd = [...cmd, String(args.runId), `-o`, `simple`]
const result = await $`${cmd}`.text()
return result.trim()
},
})