Jira Integration
Pilot connects to Jira Cloud and Jira Server to receive issues and post status updates. When an issue is labeled with the pilot tag, Pilot implements it and links the resulting PR back to the Jira issue.
The Jira adapter supports webhook handling and API operations. For polling-based intake (like GitHub and GitLab), configure polling in config.yaml. Webhook mode requires a publicly accessible endpoint — see Tunnel for local development.
Setup
1. Create a Jira API Token
Jira Cloud:
- Go to id.atlassian.com/manage-profile/security/api-tokens
- Click Create API token
- Copy the token
Jira Server:
- Go to Profile → Personal Access Tokens
- Create a new token
2. Configure Pilot
# ~/.pilot/config.yaml
jira:
enabled: true
platform: cloud # "cloud" or "server"
base_url: https://your-company.atlassian.net
username: pilot@company.com
api_token: ${JIRA_API_TOKEN}
pilot_label: pilot
transitions:
in_progress: "21" # Jira transition ID
done: "31" # Jira transition IDFor Jira Cloud, username is your email address. For Jira Server, it’s your login username.
Configuration Reference
| Field | Type | Default | Description |
|---|---|---|---|
enabled | bool | false | Enable the Jira adapter |
platform | string | "cloud" | "cloud" or "server" |
base_url | string | required | Jira instance URL |
username | string | required | Email (Cloud) or username (Server) |
api_token | string | required | API token |
webhook_secret | string | — | HMAC secret for webhook signature verification |
pilot_label | string | "pilot" | Label that triggers Pilot |
transitions.in_progress | string | — | Jira transition ID for “In Progress” |
transitions.done | string | — | Jira transition ID for “Done” |
Finding Transition IDs
Transition IDs vary by project and workflow. To find yours:
curl -u user@example.com:$JIRA_API_TOKEN \
https://your-company.atlassian.net/rest/api/3/issue/PROJ-1/transitionsIf transition IDs are not configured, Pilot falls back to matching by status name (“In Progress”, “Done”).
Webhooks
Setting Up Jira Webhooks
- Go to Jira → Settings → System → Webhooks
- Create a new webhook pointing to
https://your-pilot.example.com/webhooks/jira - Select events: Issue created, Issue updated
Supported Events
| Event | Behavior |
|---|---|
jira:issue_created | Process if issue has pilot label |
jira:issue_updated | Process if pilot label was just added (changelog detection) |
comment_created | Ignored |
Webhook Security
Jira webhooks are verified using HMAC-SHA256 signatures via the X-Hub-Signature header. If webhook_secret is not set, all webhooks are accepted.
API Differences: Cloud vs Server
| Aspect | Jira Cloud | Jira Server |
|---|---|---|
| API version | REST API v3 | REST API v2 |
| Auth | Basic (email:token) | Basic (username:token) |
| Description format | ADF (Atlassian Document Format) | Plain text / HTML |
| Comment format | ADF | Plain text |
Pilot automatically detects the platform from configuration and uses the correct API version and content format.
Issue Type Mapping
Priority Mapping
| Jira Priority | Value | Pilot Priority |
|---|---|---|
| Highest / Blocker / Critical | 1 | Urgent |
| High / Major | 2 | High |
| Medium | 3 | Medium |
| Low / Minor | 4 | Low |
| Lowest / Trivial | 5 | Lowest |
Task Conversion
Jira issues are converted to Pilot tasks with the following mapping:
| Jira Field | Pilot Field | Format |
|---|---|---|
| Issue key | Task ID | JIRA-{key} (e.g., JIRA-PROJ-42) |
| Summary | Title | Direct |
| Description | Description | Cleaned text (ADF extracted for Cloud) |
| Priority | Priority | Mapped (see table above) |
| Labels | Labels | Filtered (excludes pilot and priority labels) |
| Project key | ProjectKey | Direct |
Reliability Features (v2.10.0)
ProcessedStore — Duplicate Prevention
The Jira poller tracks which issues have been processed using a persistent store backed by SQLite. This prevents duplicate task dispatch across restarts, hot upgrades, and crash recovery.
On startup the poller loads previously processed issue keys. After successful execution an issue is marked as processed; if execution fails, the mark is removed so the issue is retried on the next poll cycle.
No additional configuration is required — ProcessedStore is wired automatically when using the default Pilot setup.
Autopilot Pipeline via OnPRCreated
Starting in v2.10.0, Jira-sourced tasks have full autopilot parity with GitHub issues. When Pilot creates a PR for a Jira issue, the OnPRCreated callback wires it into the autopilot controller, enabling:
- CI monitoring — Pilot watches the PR’s CI status and posts updates back to the Jira issue
- Auto-merge — PRs that pass all quality gates are merged automatically (when enabled)
- Feedback loop — CI failures trigger automatic fix attempts
This brings Jira to the same level of automation previously available only for GitHub-sourced tasks.
Status Transitions
Pilot updates Jira issue status as it works:
| Phase | Action |
|---|---|
| Started | Transitions to “In Progress” (by ID or name fallback) |
| Completed | Transitions to “Done” + adds PR as remote link |
| Failed | Posts failure comment (no state change) |
PR Linking
When Pilot creates a PR, it adds a remote link to the Jira issue pointing to the GitHub/GitLab PR URL, visible in the issue’s “Links” section.