Create GitHub issue
wopee_create_github_issueCreate a GitHub issue to report bugs found during testing or track test failures. Uses the project's connected repository with required title and body.
Instructions
Create a new GitHub issue in the project's connected repository. Use this to report bugs found during testing, track test failures, or create action items from chat discussions. The issue will be created in the GitHub repository linked to the current project. Requires the project to have GitHub integration configured and WOPEE_PROJECT_UUID to be set.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | The title of the GitHub issue | |
| body | Yes | The body/description of the GitHub issue (supports Markdown) | |
| labels | No | Optional labels to apply to the issue (e.g., ['bug', 'testing']) |
Implementation Reference
- The main tool handler for 'wopee_create_github_issue'. It reads WOPEE_PROJECT_UUID from config, sends a GraphQL mutation (CreateGitHubIssue) with title, body, and optional labels to create a GitHub issue, and returns the result URL/number/title.
export const wopeeCreateGithubIssue = { name: ToolName.WOPEE_CREATE_GITHUB_ISSUE, config: { title: "Create GitHub issue", description: "Create a new GitHub issue in the project's connected repository. Use this to report bugs found during testing, track test failures, or create action items from chat discussions. The issue will be created in the GitHub repository linked to the current project. Requires the project to have GitHub integration configured and WOPEE_PROJECT_UUID to be set.", inputSchema: InputSchema.shape, }, handler: async (input: Input) => { try { const { WOPEE_PROJECT_UUID } = getConfig(); if (!WOPEE_PROJECT_UUID) return { content: [ { type: "text" as const, text: "WOPEE_PROJECT_UUID is not set" }, ], }; const result = await requestClient<{ createGitHubIssue: { url: string; number: number; title: string; } | null; }>(CreateGitHubIssue, { projectUuid: WOPEE_PROJECT_UUID, title: input.title, body: input.body, labels: input.labels || [], }); if (!result?.createGitHubIssue) return { content: [ { type: "text" as const, text: "Failed to create GitHub issue. Make sure the project has GitHub integration configured.", }, ], }; return { content: [ { type: "text" as const, text: `GitHub issue created successfully:\n- Title: ${result.createGitHubIssue.title}\n- Number: #${result.createGitHubIssue.number}\n- URL: ${result.createGitHubIssue.url}`, }, ], }; } catch (error) { return _parseError(error); } }, }; - Zod input schema defining the expected inputs: title (string), body (string, Markdown), and optional labels (array of strings).
const InputSchema = z.object({ title: z.string().describe("The title of the GitHub issue"), body: z .string() .describe("The body/description of the GitHub issue (supports Markdown)"), labels: z .array(z.string()) .optional() .describe( "Optional labels to apply to the issue (e.g., ['bug', 'testing'])", ), }); - src/tools/index.ts:11-28 (registration)The tool is imported from './wopee_create_github_issue/index.js' and registered in the TOOLS array at line 27.
import { wopeeCreateGithubIssue } from "./wopee_create_github_issue/index.js"; export const TOOLS = [ wopeeCreateBlankSuite, wopeeFetchAnalysisSuites, wopeeFetchExecutedTestCases, wopeeDispatchAnalysis, wopeeDispatchAgent, wopeeFetchArtifact, wopeeUpdateArtifact, wopeeGenerateArtifact, wopeeSendChatMessage, wopeeReadChatHistory, wopeeCreateGithubIssue, ]; - src/tools/shared/types.ts:15-16 (registration)Enum value ToolName.WOPEE_CREATE_GITHUB_ISSUE = 'wopee_create_github_issue' used to identify this tool by name.
WOPEE_CREATE_GITHUB_ISSUE = "wopee_create_github_issue", } - The GraphQL mutation 'CreateGitHubIssue' that sends projectUuid, title, body, and labels to the backend and returns url, number, and title.
export const CreateGitHubIssue = ` mutation CreateGitHubIssue($projectUuid: ID!, $title: String!, $body: String!, $labels: [String!]) { createGitHubIssue(projectUuid: $projectUuid, title: $title, body: $body, labels: $labels) { url number title } } `;