Add Jira Data Center automation event source#136
Conversation
|
🚀 Deploy Preview PR Created/Updated A deploy preview has been created/updated for this PR. Deploy PR: https://github.com/OpenHands/deploy/pull/4392 Once the deploy PR's CI passes, the automation service will be deployed to the feature environment. |
all-hands-bot
left a comment
There was a problem hiding this comment.
🟢 Good taste - Clean implementation that follows established patterns.
This PR adds Jira DC webhook support following the same pattern as the GitHub integration. The code is straightforward, well-tested, and properly reserves the source name to prevent conflicts. E2E validation on replicated-02 confirms the implementation works correctly with real events.
[RISK ASSESSMENT]
- [Overall PR]
⚠️ Risk Assessment: 🟢 LOW
This is a straightforward feature addition. The implementation follows the existing GitHub integration pattern, includes comprehensive test coverage, and uses the established security model. The builtin source registration correctly takes precedence over any potential custom webhooks with the same name. E2E testing confirms the integration works as expected.
VERDICT:
✅ Worth merging: Clean, well-tested feature addition
KEY INSIGHT:
The builtin source lookup correctly prioritizes builtin sources over custom webhooks, ensuring the Jira DC integration always uses the configured webhook secret even if a custom source with the same name exists.
Was this automated review useful? React with 👍 or 👎 to this review to help us measure review quality.
Workflow run: https://github.com/OpenHands/automation/actions/runs/26304302224
Summary
Adds a built-in
jira_dcautomation event source for OpenHands-forwarded Jira Data Center webhook events.webhookEventfieldjira_dcso it cannot be used as a custom webhook sourceValidation
uv run pytest tests/test_event_schemas.py tests/test_webhook_router.py -quv run ruff check openhands/automation/event_schemas/jira_dc.py openhands/automation/event_schemas/__init__.py openhands/automation/schemas.py openhands/automation/utils/webhook.py tests/test_event_schemas.py tests/test_webhook_router.py tests/test_event_router.pyuv run ruff format --check openhands/automation/event_schemas/jira_dc.py openhands/automation/event_schemas/__init__.py openhands/automation/schemas.py openhands/automation/utils/webhook.py tests/test_event_schemas.py tests/test_webhook_router.py tests/test_event_router.pypytest tests/)replicated-02: built-injira_dccomment_createdevent was received by automation, matched1/1, dispatched run17b66b18-8e16-4660-9fa4-5510cc0ca8e7, and completed successfully.replicated-02: built-injira_dcjira:issue_updatedevent was received by automation, matched1/1, dispatched run4c17c4b2-e7e1-4c37-a11a-39c06cc49258, and completed successfully.Local note: the DB-backed event router test depends on Docker/Testcontainers, so it was not run from the local workstation. It is covered by CI's full
pytest tests/run and by the OHE E2E checks above.