Skip to content

Add create-issue sub-command to Jira CLI#5

Merged
alexec merged 3 commits intomainfrom
copilot/add-create-issue-sub-command
Oct 22, 2025
Merged

Add create-issue sub-command to Jira CLI#5
alexec merged 3 commits intomainfrom
copilot/add-create-issue-sub-command

Conversation

Copy link
Contributor

Copilot AI commented Oct 22, 2025

This PR adds a new create-issue sub-command to the Jira CLI that allows users to create new Jira issues from the command line.

Usage

jira create-issue <project> <description> [assignee]

Examples

Create an issue without an assignee:

jira create-issue PROJ "Fix the login bug"

Create an issue with an assignee:

jira create-issue PROJ "Implement new feature" john.doe

Implementation Details

The new command:

  • Requires a project key (e.g., "PROJ") to specify which project the issue belongs to
  • Requires a description that will be used as both the summary and description of the issue
  • Accepts an optional assignee username to assign the issue upon creation
  • Creates issues with the "Task" issue type by default
  • Returns the created issue key (e.g., "PROJ-123") on success

The implementation follows the existing patterns in the codebase:

  • Uses the executeCommand() helper for authentication and client setup
  • Integrates with the existing command parsing structure
  • Provides consistent error handling and output formatting

Changes

  • main.go: Added command parsing, validation, and the createIssue() function
  • README.md: Updated documentation to include the new command in both the prompt section and usage examples

Testing

✅ Build verification
✅ Argument validation (proper error messages for missing parameters)
✅ CodeQL security scan (0 vulnerabilities found)
✅ No new dependencies added

Note: End-to-end testing requires valid Jira credentials and can be performed using the existing jira configure command to set up authentication.

Original prompt

Add a new sub-command that create a issue. I'll need to be able to provide the project that the issue belongs to and a description of the issue, and an optional assignee.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits October 22, 2025 16:49
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Copilot AI changed the title [WIP] Add new sub-command to create an issue Add create-issue sub-command to Jira CLI Oct 22, 2025
Copilot AI requested a review from alexec October 22, 2025 16:54
@alexec alexec marked this pull request as ready for review October 22, 2025 16:58
@alexec
Copy link
Contributor

alexec commented Oct 22, 2025

@copilot please update PR title to be semantic.

@alexec alexec merged commit 4a63f65 into main Oct 22, 2025
2 of 3 checks passed
@alexec alexec deleted the copilot/add-create-issue-sub-command branch October 22, 2025 17:00
Copilot AI requested a review from alexec October 22, 2025 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants