feat: add tea CLI pull request tools
Add three tools for managing pull requests via the tea CLI: - tea-pulls: list pull requests filtered by state - tea-pr-get: get PR details with comments - tea-pr-create: create a PR with title, branch, assignees, and labels
This commit was merged in pull request #110.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { tool } from "@opencode-ai/plugin"
|
||||
import { $ } from "bun"
|
||||
|
||||
export default tool({
|
||||
description: "List pull requests in the repository using tea CLI",
|
||||
args: {
|
||||
state: tool.schema.string().optional().describe("Filter by state (all|open|closed)"),
|
||||
},
|
||||
async execute(args) {
|
||||
const state = args.state || "open"
|
||||
const result = await $`tea pulls --state ${state} --output json`.text()
|
||||
return result.trim()
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user