16 lines
659 B
TypeScript
16 lines
659 B
TypeScript
import { tool } from "@opencode-ai/plugin"
|
|
|
|
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)"),
|
|
labels: tool.schema.string().optional().describe("Comma-separated list of labels"),
|
|
milestone: tool.schema.string().optional().describe("Milestone name"),
|
|
},
|
|
async execute(args) {
|
|
const cmd = `tea issues create -t "${args.title}" -d "${args.description}"`
|
|
const result = await Bun.$`${cmd}`.text()
|
|
return result.trim()
|
|
},
|
|
}) |