14 lines
487 B
TypeScript
14 lines
487 B
TypeScript
import { tool } from "@opencode-ai/plugin"
|
|
import { $ } from "bun"
|
|
|
|
export default tool({
|
|
description: "Create a new issue in the GitHub repository using tea CLI",
|
|
args: {
|
|
title: tool.schema.string().describe("Issue title"),
|
|
description: tool.schema.string().optional().describe("Issue description (supports markdown)"),
|
|
},
|
|
async execute(args) {
|
|
const result = await $`tea issues create -t ${args.title} -d ${args.description}`.text()
|
|
return result.trim()
|
|
},
|
|
}) |