Create GitHub Issue
Overview
Create a well-formed GitHub issue using the gh CLI tool, returning the issue URL for reference. Supports title, body, labels, milestone, and assignee options.
Arguments
Definitions
- •
<title>(required): The issue title. - •
[body](optional): The issue body/description. - •
[labels](optional): Comma-separated list of labels to apply. - •
[milestone](optional): Milestone to assign the issue to. - •
[assignee](optional): GitHub username to assign (use@mefor self).
Values
$ARGUMENTS
Core Principles
- •Verify
ghCLI is available and authenticated before attempting creation - •Validate required parameters before executing
- •Use proper escaping for special characters in title and body
- •Return the created issue URL for use in workflows
Instructions
- •
Verify the
ghCLI is available by runninggh --version - •
Parse the title and optional parameters from the command input
- •
Build the
gh issue createcommand with provided parameters:codegh issue create --title "<title>" [--body "<body>"] [--label "<labels>"] [--milestone "<milestone>"] [--assignee "<assignee>"]
- •
Execute the command and capture the output
- •
If successful, extract and return the issue URL from the output
- •
If creation fails, report the error and suggest fixes (authentication, permissions, etc.)
Output Guidance
Provide a brief confirmation message:
On success:
code
Issue created: https://github.com/owner/repo/issues/123 Title: Add authentication Labels: enhancement, priority-high
On failure:
code
Failed to create issue: <error message from gh CLI> Suggestion: Check that gh is authenticated with 'gh auth status'