Skip to content

feat: add Lark/Feishu helpdesk provider#5633

Open
janisag07 wants to merge 2 commits intokeephq:mainfrom
janisag07:feat/lark-provider
Open

feat: add Lark/Feishu helpdesk provider#5633
janisag07 wants to merge 2 commits intokeephq:mainfrom
janisag07:feat/lark-provider

Conversation

@janisag07
Copy link

Summary

Adds a new Lark/Feishu provider to receive helpdesk ticket events via webhooks, query tickets, and create new tickets via the Lark Open API.

Changes

  • keep/providers/lark_provider/lark_provider.py — Full provider implementation
  • keep/providers/lark_provider/alerts_mock.py — Sample helpdesk ticket event payload
  • tests/test_lark_provider.py — 12 unit tests

Features

  • Webhook ingestion: Receives helpdesk.ticket.created_v1 and helpdesk.ticket.updated_v1 events
  • API query: Fetches helpdesk tickets
  • Notify: Creates new helpdesk tickets
  • Priority→Severity mapping: urgent→critical, high→high, medium→warning, low→low
  • Token cache with TTL: Tenant access tokens auto-refresh after 110min (Lark TTL is 2h)
  • PROVIDER_TAGS, PROVIDER_SCOPES, FINGERPRINT_FIELDS configured

Linked Issue

Closes #5427

Checklist

  • Provider follows existing patterns
  • 12 unit tests (priority mapping + token cache TTL refresh)
  • alerts_mock.py with realistic payload
  • CODE-DOC-TEMPLATE.md included

@vercel
Copy link

vercel bot commented Feb 16, 2026

Someone is attempting to deploy a commit to the KeepHQ Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Feb 16, 2026
@CLAassistant
Copy link

CLAassistant commented Feb 16, 2026

CLA assistant check
All committers have signed the CLA.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 16, 2026

Target branch is not in the allowed branches list.

@dosubot dosubot bot added Feature A new feature Provider Providers related issues labels Feb 16, 2026
…r Lark provider

- BUG FIX: Priority was ignored, severity always INFO → now maps priority 1-4 to critical/high/warning/low
- BUG FIX: Token cache had no TTL → tokens now refresh after 110min (Lark TTL is 2h)
- Added PROVIDER_TAGS, PROVIDER_SCOPES, FINGERPRINT_FIELDS
- Added 12 unit tests (format_alert + token cache)
- Added CODE-DOC-TEMPLATE.md
@janisag07
Copy link
Author

recheck

@janisag07
Copy link
Author

recheck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature A new feature Provider Providers related issues size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🔌 Provider]: lark/feishu servicedesk provider

2 participants