jira-datacenter
Jira Data Center integration — create issues, get/update, add comments, transition status, search via JQL, manage users and groups.
Installation
The Jira module is an external module — it must be added and compiled into your Shiro binary. No proxy server required; it talks directly to Jira Data Center via PAT.
bash
# 1. Register the module
shiro add module github.com/rajitk13/shiro-jira-module
# 2. Recompile shiro with the jira module baked in
shiro buildshiro build auto-generates internal/cli/registry.go, runs go mod tidy, and recompiles the binary.
Environment Variables
| Variable | Required | Description |
|---|---|---|
JIRA_BASE_URL | Yes | Base URL of your Jira instance (e.g. https://jira.corp.example.com) |
JIRA_API_TOKEN | Yes | Personal Access Token (PAT) — sent as Bearer token |
Operations
create_issue
| Field | Type | Description |
|---|---|---|
projectrequired | string | Project key (e.g. DEV) |
summaryrequired | string | Issue title |
description | string | Issue description |
issue_type | string | Issue type — defaults to "Task" |
priority | string | High, Medium, Low |
assignee | string | Account ID or username of assignee |
labels | string | Comma-separated labels |
json
{
"id": "create_ticket",
"type": "jira",
"config": {
"operation": "create_issue",
"project": "DEV",
"summary": "Deploy: {{steps.ai_review.text}}",
"description": "Automated ticket from CI pipeline",
"issue_type": "Task",
"priority": "High"
}
}get_issue
| Field | Type | Description |
|---|---|---|
issue_keyrequired | string | Issue key (e.g. DEV-42) |
json
{
"id": "fetch_ticket",
"type": "jira",
"config": {
"operation": "get_issue",
"issue_key": "DEV-42"
}
}update_issue
| Field | Type | Description |
|---|---|---|
issue_keyrequired | string | Issue key (e.g. DEV-42) |
summary | string | New summary |
description | string | New description |
priority | string | New priority |
assignee | string | New assignee username |
labels | string | Comma-separated labels |
add_comment
| Field | Type | Description |
|---|---|---|
issue_keyrequired | string | Issue key (e.g. DEV-42) |
commentrequired | string | Comment body text |
json
{
"id": "post_comment",
"type": "jira",
"config": {
"operation": "add_comment",
"issue_key": "{{steps.create_ticket.output.issue_key}}",
"comment": "AI Review:\n{{steps.ai_review.text}}"
},
"depends_on": ["create_ticket", "ai_review"]
}transition_issue
| Field | Type | Description |
|---|---|---|
issue_keyrequired | string | Issue key (e.g. DEV-42) |
transition_idrequired | string | Jira transition ID (from Jira UI workflow) |
search_issues
| Field | Type | Description |
|---|---|---|
jqlrequired | string | JQL query string |
json
{
"id": "find_open_bugs",
"type": "jira",
"config": {
"operation": "search_issues",
"jql": "project = DEV AND issuetype = Bug AND status != Done ORDER BY priority DESC"
}
}User & Group Operations
get_userGet user info. Requires username or account_id.
get_user_groupsGet groups for a user. Requires username or account_id.
add_user_to_groupAdd user to a group. Requires admin permissions. Needs username/account_id + group_name.
get_group_membersList all members of a group. Requires group_name.
Output Fields
| Field | Type | Description |
|---|---|---|
issue_key | string | Jira issue key (e.g. DEV-42) |
issue_id | string | Internal Jira issue ID |
url | string | Browser URL to the issue |
comment_id | string | ID of the created comment (add_comment only) |
total | number | Total results count (search_issues only) |
data | object | Full issue or search result payload from Jira API |
user | object | User information (get_user only) |
groups | array | List of groups (get_user_groups only) |
members | array | List of group members (get_group_members only) |
success | boolean | Operation success flag (add_user_to_group only) |
Full Workflow Example
AI code review → create Jira ticket → post comment with review output
json
{
"name": "ai-review-to-jira",
"steps": [
{
"id": "get_diff",
"type": "git.diff",
"config": { "operation": "diff", "base_branch": "main" }
},
{
"id": "ai_review",
"type": "ai.generate",
"config": {
"prompt": "Review this code diff:\n{{steps.get_diff.diff}}",
"model": "gpt-4o"
},
"depends_on": ["get_diff"]
},
{
"id": "create_ticket",
"type": "jira",
"config": {
"operation": "create_issue",
"project": "DEV",
"summary": "Code Review: {{env.CI_COMMIT_SHORT_SHA}}",
"description": "{{steps.ai_review.text}}",
"issue_type": "Task",
"priority": "Medium"
},
"depends_on": ["ai_review"]
},
{
"id": "log_ticket",
"type": "print",
"config": {
"message": "Created ticket: {{steps.create_ticket.output.issue_key}} — {{steps.create_ticket.output.url}}"
},
"depends_on": ["create_ticket"]
}
]
}