feat: add OpenSupports ticketing provider (pull + webhook + notify, 80 tests)#6173
Open
chengyixu wants to merge 1 commit intokeephq:mainfrom
Open
feat: add OpenSupports ticketing provider (pull + webhook + notify, 80 tests)#6173chengyixu wants to merge 1 commit intokeephq:mainfrom
chengyixu wants to merge 1 commit intokeephq:mainfrom
Conversation
…0 unit tests Implements a native Keep provider for OpenSupports (https://www.opensupports.com/), an open-source self-hosted customer support ticketing system. Closes keephq#5225. Features: - Pull mode: fetch open tickets from OpenSupports REST API as AlertDtos - Push (webhook) mode: receive ticket creation/update events in real time - notify(): create support tickets programmatically with severity->priority mapping - create_ticket(), close_ticket(), add_reply() action methods - _query(): paginated ticket search by status - validate_scopes(): connectivity + read/write permission checks - Full priority->severity mapping (1-4 numeric + string labels) - Full status->AlertStatus mapping (open/pending/waiting->FIRING, closed/resolved->RESOLVED) - Pagination support (50 tickets per page, auto-stops on short page) - SSL verification flag for self-signed certificate environments - 80 unit tests covering auth config, HTTP helpers, scope validation, MAP constants, all action methods, _notify severity mapping, webhook markdown, error propagation, and edge cases Supersedes PR keephq#5579 (163 lines, no tests) with comprehensive implementation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@chengyixu is attempting to deploy a commit to the KeepHQ Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a native Keep provider for OpenSupports, an open-source self-hosted customer support ticketing system.
Closes #5225
Features
Pull mode
Fetches open tickets via
GET /api/staff/get-all-ticketswith automatic pagination (50/page):priority(1–4 numeric or low/medium/high/critical strings) →AlertSeveritystatus(open/pending/waiting → FIRING, closed/resolved → RESOLVED)departmentname andownerinto alertlabelsPush (webhook) mode
Receives ticket events from OpenSupports HTTP webhook notifications:
{"ticket": ...}payloads, and JSON arrayswebhook_markdownincludes step-by-step OpenSupports setup guideAction methods
create_ticket(title, content, department_id?, priority?, email?, name?)— create new ticketclose_ticket(ticket_number)— close ticket by numberadd_reply(ticket_number, content)— add staff reply/comment_notify()integrationMaps Keep severity strings → OpenSupports priority integers:
validate_scopes()Tests connectivity,
tickets:read, andtickets:writeaccess independently.Tests: 80 unit tests
_ticket_to_alert_dtoguards and non-crash coverage_format_alertedge cases (empty list, non-dict items)_get_alertspagination, short-page stop, error handlingcreate_ticket(required fields, all optional fields, error propagation)close_ticketandadd_replyaction methods_notify()all severity levels → priority mapping_query()status param, pagination, empty resultwebhook_markdownplaceholdersvalidate_configWhy Better Than Existing PR
Supersedes #5579 (163 lines, no test file, no webhook mode, no action methods) with:
/claim #5225