Repository navigation
[3557 by Claude Opus 5.5] Official plugin: Jira Cloud (start work from a ticket, keep the ticket in sync) - #3626
Conversation
…d the docs page. Everything I ran passes, but I did not test against a real Jira site, and I did not run the full repository suite or the existing Plugins Playwright specs. How it works - Webhooks, not polling. Atlassian documents a secret for administrator-registered webhooks: Jira signs each request in `X-Hub-Signature` (`sha256=` plus the HMAC of the body). ProPR checks it with the existing `hmac-sha256` scheme before any plugin code runs. `X-Atlassian-Webhook-Identifier` stays the same across Jira's retries, so I use it as the delivery id and a repeat is refused. Because of this I did not build the polling fallback or a `schedule` subscription kind; the README explains the choice. - Hand-off. A ticket created with the trigger label, or updated so the label is added, is read back by id from the configured site. If its project is mapped to one repository, it creates one GitHub issue. This reuses the shared Linear helper, so de-duplication, quoting and inert `@mentions` behave the same. - Description conversion. Jira's rich-text description is converted to Markdown in `jira/adf.ts`: - Headings, lists, quotes, code and tables come only from the document's structure. - Markdown punctuation in ticket text is escaped, so text cannot create an image or a link. - Images and attachments become "(attachment not copied)". - Only `http(s)` URLs are kept, and only as text. - Macros and app content are dropped. - Sync back. The same six switchable comments, posted in Jira's own comment format. Status moves use the ticket's workflow transition to the configured status name. If no transition reaches that status, a warning appears in Activity and the comment and later events still go ahead. A ticket already in the status is left alone. - Choices. Projects load from Jira, paged up to 250. Statuses load from the workflows of the mapped projects, so the project mapping has to be saved first. - Agent context. Only the `jira-ticket` skill. Atlassian's MCP server is left out: it takes OAuth, or a personal API token only as Basic auth where an organisation admin enables it, and ProPR sends MCP credentials only as Bearer. The README and docs page say this. Platform changes - Basic auth: a token connection can declare `"authorization": "basic"`. The value is entered as `email:token`, and a value without that shape is refused when set. It is sent as `Authorization: Basic …`, and the whole value, its header form and the token part on its own are all redacted. - Allowed hosts for URL settings: a URL setting can declare `hosts` (Jira uses `["*.atlassian.net"]`). Any other host is refused at save time, in the UI before saving and by the API, and gives the plugin no outbound host. The field hint now names the allowed hosts. - Regenerated files: the OpenAPI spec and client types. - Platform docs: updated for both changes. - Test helper: the core plugin test helper can now save settings before enabling, because Jira requires the site URL. Tests - Plugins and shared: 239 pass, 12 of them new Jira tests. - Core plugin suites: 171 pass, including the new Jira test through ProPR's real receiver and a new Basic-credential redaction test. - API plugin and OpenAPI suites: 30 pass. - Plugins page UI: 69 pass. - Also passing: `plugins:check` (7 plugins), the OpenAPI check, typechecks, zero-warning lint on the changed core, API, plugins and UI files, and the docs build. - I broke the Markdown escaping, the host check and the Basic header on purpose, and the tests failed each time. Things to know - Atlassian's webhook page has no sample of a labels change. I assumed the same space-separated before/after strings Jira uses for other fields. - I couldn't load Atlassian's transition reference page, so the transition endpoints match third-party documentation and my own knowledge. - The README says scoped API tokens must be called through `api.atlassian.com` and so are not supported. That is from memory, not checked against Atlassian's docs. - There is no check of how old a webhook is, because Jira retries up to five times, 5 to 15 minutes apart. Replays are handled by the delivery id and by de-duplicating tickets. - I captured four previews of the Configure step, on desktop and phone, using the real manifest with mocked Jira data. They show the loaded choices and the refusal of `https://jira.example.com`. I used a temporary Playwright spec and deleted it afterwards. Sources: [Jira webhooks](https://developer.atlassian.com/cloud/jira/platform/webhooks/), [Rovo MCP getting started](https://support.atlassian.com/atlassian-rovo-mcp-server/docs/getting-started-with-the-atlassian-remote-mcp-server/), [Rovo MCP API token auth](https://support.atlassian.com/atlassian-rovo-mcp-server/docs/configuring-authentication-via-api-token/), [Jira REST v3 issue transitions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-transitions/), [withone.ai transition reference](https://withone.ai/knowledge/jira/conn_mod_def%3A%3AGJ4qfCdCUXo%3A%3AEHXg3vKkR9eBZqXkKHkbZg), [Atlassian bulk transition announcement](https://community.atlassian.com/t5/Enterprise-discussions/Introducing-the-Bulk-Transition-API-Simplify-Your-Workflow/td-p/2884971) Acceptance criteria - AC1: met — `packages/plugins/test/jira.test.ts`: the trigger label creates exactly one issue; repeated, replayed and re-sent deliveries create none; unmapped projects, other label changes, title edits and other events do nothing and never call Jira. `packages/core/test/jiraPluginEvents.test.ts`: forged, missing and tampered signatures get 401 before any plugin code runs, and a repeated identifier gets 409. - AC2: met — `jira.test.ts` ("each sync-back event posts its comment and transition when switched on, once, and nothing when off" and "a status no transition reaches is reported in Activity…"). - AC3: met — `jira.test.ts` ("a site URL outside *.atlassian.net is refused when the settings are saved…"), `jiraPluginEvents.test.ts` (the plugin store refuses it with 400), `packages/shared/test/plugins.test.ts` and `propr-ui/src/pages/PluginsPage/PluginSettingsForm.test.tsx`. - AC4: met — `jira.test.ts` (the injection test, plus "Jira's document format becomes Markdown…" and the sentinel test). - AC5: met — `packages/plugins/jira/README.md` (setup, permissions, manual smoke-test checklist, documentation links) and `docs/docs/plugins/jira.md`.
|
/ultrafix goal=8 max=10 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 10) First action:
|
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR implements Jira intake, sync-back, configuration choices, and documentation with substantial fixture coverage. It needs changes before merge because existing ticket records are not bound to their originating Jira site. ✅ Verified webhook boundary — The manifest selects HMAC verification, and the receiver verifies signatures before reserving deliveries or running handlers. ✅ Restricted outbound hosts — URL validation checks the declared host restriction both when saving settings and when deriving outbound hosts. ✅ Focused platform integration — Basic authentication extends the existing HTTP client and includes redaction coverage for the combined credential and token. This review used the supplied diff and context only; no commands or tests were run. The authoritative check summary shows no failures and two pending checks. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F1: 🔴 Bind tracked tickets to their Jira site
SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Capture a real labels-change fixtureThe implementation summary acknowledges that space-separated label changes were assumed, and the new fixtures encode that same assumption. A sanitized webhook captured from Jira would independently validate ScoreThe implementation has useful boundary checks and extensive tests, but site reconfiguration can misroute existing work and suppress unrelated tickets. That correctness defect requires correction before merge. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit cc4db82
Summary of ChangesI've fixed F1: Jira ticket records now remember which site they came from. Changing the Jira site URL can no longer send one site's comments or status changes to an unrelated ticket on another site, and the new site's tickets are no longer counted as duplicates of the old site's. All the checks I ran pass. What changed
Tests
Still to know: I didn't run the full repository suite. Nothing visible in the interface changed, so I made no previews. Review digestRisk-tiered paths
Validation evidence
Diff size: 6 files changed, +110/−17 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…they came from. Changing the Jira site URL can no longer send one site's comments or status changes to an unrelated ticket on another site, and the new site's tickets are no longer counted as duplicates of the old site's. All the checks I ran pass. I've fixed F1: Jira ticket records now remember which site they came from. Changing the Jira site URL can no longer send one site's comments or status changes to an unrelated ticket on another site, and the new site's tickets are no longer counted as duplicates of the old site's. All the checks I ran pass. **What changed** - **Records include the site.** A ticket is now stored as `<site host>/<issue id>`, for example `acme.atlassian.net/10123`, through new helpers in `packages/plugins/jira/api.ts`. Because this key is also what de-duplication uses, ticket `10123` on two different sites counts as two tickets. The shared tracker code used by Linear is unchanged. - **Sync-back checks the site first** (`jira/sync.ts`). If a ticket came from a different site than the one configured now, the event is skipped with reason `other_site` and a warning in Activity. Jira isn't called and nothing is marked done, so the ticket's updates resume if the site URL is set back. - **Webhooks from another site are ignored** (`jira/intake.ts`). I found the same problem on the incoming side: a webhook still registered on the old site, with the same secret, would make the plugin read the new site's ticket with the same number and hand it over. Intake now compares the ticket's own URL in the webhook (`issue.self`) with the configured site and ignores a mismatch (`other_site`) before calling Jira. - **Docs.** `jira/README.md` and `docs/docs/plugins/jira.md` now explain this, and the docs have a new troubleshooting row for the warning. **Tests** - **New regression test** in `packages/plugins/test/jira.test.ts`, which follows one ticket through a site change: 1. Hand over ENG-123 from site A. 2. Switch to site B. The started, opened and merged events are all skipped as `other_site` with no requests to any site, and a webhook from A is ignored. 3. B's own ticket `10123` creates a new issue and is commented on at B only. 4. Switch back to A. A's ticket syncs again, B's is skipped, and A's ticket is still a duplicate. - **Breaking each fix fails the test.** I undid each of the three changes in turn (record key, webhook site check, sync site check) and the new test failed each time. - **Everything else I ran passes:** - All 103 plugin tests. - The core Jira and Linear webhook tests (7). - Plugins typecheck, zero-warning lint on the changed files, `plugins:check` (7 plugins) and the docs build. **Still to know:** I didn't run the full repository suite. Nothing visible in the interface changed, so I made no previews. PR: #3626 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR adds Jira Cloud intake and sync-back using the existing tracker helpers, with focused platform support for Basic authentication and restricted URL settings. The supplied code supports merging, conditional on the remaining checks completing successfully. ✅ Authenticated intake — The manifest selects HMAC verification before dispatch, and intake reads tickets back from the configured site before creating issues. ✅ Site-bound tracking — Ticket identities include the Jira host; sync-back refuses to update records belonging to another configured site. ✅ Focused regression coverage — Added tests cover signature rejection, duplicate intake, credential redaction, host restrictions, and independently retried sync actions. This was a static review of the supplied diff and surrounding context; no commands or tests were run. Current checks show 31 passed, three pending, and no failures. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S2: 🟢 Validate real label-change payloads
S3: 🟢 Align troubleshooting with recorded diagnostics
ScoreThe implementation is cohesive and has substantial targeted coverage, with no verified merge blocker in the supplied code. Real Jira payload validation would improve confidence; remaining CI checks are pending rather than failing. Score: 8/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
ℹ️ GitHub auto-merge is turned off for this repository, so ProPR merges this PR itself once it is ready (checks passed or no CI configured, and the review goal met). To let GitHub merge it the moment required checks pass, enable Settings → General → Pull Requests → Allow auto-merge. |
AI Implementation Summary
Closes #3557
Branch:
3557/claude-opus-5-5-official-plugin-jira-clou-20261117-0122-3s3Commits: ✅ Changes committed (12ca248)
AI Processing Completed
Execution Details:
Summary:
I've built the Jira Cloud plugin in
packages/plugins/jira/and added the docs page. Everything I ran passes, but I did not test against a real Jira site, and I did not run the full repository suite or the existing Plugins Playwright specs.How it works
X-Hub-Signature(sha256=plus the HMAC of the body). ProPR checks it with the existinghmac-sha256scheme before any plugin code runs.X-Atlassian-Webhook-Identifierstays the same across Jira's retries, so I use it as the delivery id and a repeat is refused. Because of this I did not build the polling fallback or aschedulesubscription kind; the README explains the choice.@mentionsbehave the same.jira/adf.ts:http(s)URLs are kept, and only as text.jira-ticketskill. Atlassian's MCP server is left out: it takes OAuth, or a personal API token only as Basic auth where an organisation admin enables it, and ProPR sends MCP credentials only as Bearer. The README and docs page say this.Platform changes
"authorization": "basic". The value is entered asemail:token, and a value without that shape is refused when set. It is sent asAuthorization: Basic …, and the whole value, its header form and the token part on its own are all redacted.hosts(Jira uses["*.atlassian.net"]). Any other host is refused at save time, in the UI before saving and by the API, and gives the plugin no outbound host. The field hint now names the allowed hosts.Tests
plugins:check(7 plugins), the OpenAPI check, typechecks, zero-warning lint on the changed core, API, plugins and UI files, and the docs build.Things to know
api.atlassian.comand so are not supported. That is from memory, not checked against Atlassian's docs.https://jira.example.com. I used a temporary Playwright spec and deleted it afterwards.Sources: Jira webhooks, Rovo MCP getting started, Rovo MCP API token auth, Jira REST v3 issue transitions, withone.ai transition reference, Atlassian bulk transition announcement
Acceptance criteria
packages/plugins/test/jira.test.ts: the trigger label creates exactly one issue; repeated, replayed and re-sent deliveries create none; unmapped projects, other label changes, title edits and other events do nothing and never call Jira.packages/core/test/jiraPluginEvents.test.ts: forged, missing and tampered signatures get 401 before any plugin code runs, and a repeated identifier gets 409.jira.test.ts("each sync-back event posts its comment and transition when switched on, once, and nothing when off" and "a status no transition reaches is reported in Activity…").jira.test.ts("a site URL outside *.atlassian.net is refused when the settings are saved…"),jiraPluginEvents.test.ts(the plugin store refuses it with 400),packages/shared/test/plugins.test.tsandpropr-ui/src/pages/PluginsPage/PluginSettingsForm.test.tsx.jira.test.ts(the injection test, plus "Jira's document format becomes Markdown…" and the sentinel test).packages/plugins/jira/README.md(setup, permissions, manual smoke-test checklist, documentation links) anddocs/docs/plugins/jira.md.Review digest
Acceptance criteria (5 of 5 met, as stated by the agent)
Fixture-based handler tests: trigger label added on a mapped ticket creates exactly one GitHub issue; repeats create none; unmapped projects and other changes do nothing; an unauthenticated webhook is rejected before plugin code runs (or, with polling, the cursor advances and no ticket is processed…—`packages/plugins/test/jira.test.ts`: the trigger label creates exactly one issue; repeated, replayed and re-sent deliveries create none; unmapped projects, other label changes, title edits and other events do nothing and never call Jira. `packages/core/test/jiraPluginEvents.test.ts`: forged, missi…Each sync-back event posts the expected comment or transition when on and nothing when off; a missing state is reported in Activity.—`jira.test.ts` ("each sync-back event posts its comment and transition when switched on, once, and nothing when off" and "a status no transition reaches is reported in Activity…").A site URL outside `*.atlassian.net` is refused at save time.—`jira.test.ts` ("a site URL outside *.atlassian.net is refused when the settings are saved…"), `jiraPluginEvents.test.ts` (the plugin store refuses it with 400), `packages/shared/test/plugins.test.ts` and `propr-ui/src/pages/PluginsPage/PluginSettingsForm.test.tsx`.Ticket text cannot affect repository, labels or model (injection test); Jira's document-format description is converted to plain text or Markdown without executing or embedding anything.—`jira.test.ts` (the injection test, plus "Jira's document format becomes Markdown…" and the sentinel test).README with setup steps, required permissions and a manual smoke-test checklist; `docs/docs/plugins/jira.md`.—`packages/plugins/jira/README.md` (setup, permissions, manual smoke-test checklist, documentation links) and `docs/docs/plugins/jira.md`.Risk-tiered paths
packages/api/openapi/schemasPlugins.ts(+2/−2)packages/client/src/generated/apiTypes.ts(+6/−6)packages/core/src/plugins/pluginContext.ts(+5/−4)packages/core/src/plugins/pluginHttp.ts(+22/−7)packages/core/src/plugins/pluginStore.ts(+3/−0)packages/plugins/jira/adf.ts(added, +204/−0)packages/plugins/jira/api.ts(added, +159/−0)packages/plugins/jira/handlers.ts(added, +21/−0)packages/plugins/jira/icon.svg(added, +1/−0)packages/plugins/jira/intake.ts(added, +99/−0)packages/plugins/jira/manifest.json(added, +146/−0)packages/plugins/jira/settings.ts(added, +89/−0)packages/plugins/jira/sync.ts(added, +95/−0)packages/plugins/registry.json(+1/−0)packages/plugins/testing/index.ts(+4/−2)packages/shared/src/pluginInstallations.ts(+2/−2)packages/shared/src/plugins.ts(+35/−5)propr-ui/src/pages/PluginsPage/PluginSettingFields.tsx(+1/−1)docs/docs/architecture/plugin-runtime.md(+11/−1)docs/docs/features/plugins.md(+12/−3)docs/docs/plugins/jira.md(added, +179/−0)docs/sidebars.ts(+1/−0)docs/static/openapi/propr-api.yaml(+6/−4)packages/core/test/helpers/pluginHandlerFixture.ts(+4/−1)packages/core/test/jiraPluginEvents.test.ts(added, +141/−0)packages/core/test/pluginHandlerLifecycle.test.ts(+17/−0)packages/plugins/jira/README.md(added, +199/−0)packages/plugins/jira/fixtures/rest.json(added, +442/−0)packages/plugins/jira/fixtures/webhooks.json(added, +69/−0)packages/plugins/jira/skills/jira-ticket/SKILL.md(added, +28/−0)packages/plugins/test/jira.test.ts(added, +402/−0)packages/plugins/test/registry.test.ts(+4/−4)packages/shared/test/plugins.test.ts(+23/−3)propr-ui/src/pages/PluginsPage/PluginSettingsForm.test.tsx(+4/−0)Validation evidence
Diff size: 34 files changed, +2,437/−45 lines
Detailed Logs:
bc143c42-709e-4109-b019-2f806dcc9437Log files stored at:
/usr/src/app/logs/executions/issue-3557-2026-11-17T01-56-59-039Z-conversation.json/usr/src/app/logs/executions/issue-3557-2026-11-17T01-56-59-039Z-output.txtLatest Conversation Messages
This PR was created automatically by ProPR after processing issue #3557.
💡 Need changes?
Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!
Visual preview
Jira Cloud: Configure step (desktop)
The Jira Cloud plugin's settings at desktop width: site URL, project mapping and status choices loaded through optionsFrom (mocked Jira data)
Full-size original
Jira Cloud: Configure step (phone)
The same settings at 390px width
Full-size original
Site URL outside *.atlassian.net refused (desktop)
Saving https://jira\.example\.com is refused with 'siteUrl must be on *.atlassian.net, not jira.example.com'; the field hint names the allowed hosts
Full-size original
Site URL refused (phone)
The save-time refusal at 390px width
Full-size original