mirror of
https://github.com/langgenius/dify-plugin-sdks.git
synced 2026-08-26 18:56:41 -04:00
refactor(trigger): remove resubscribe functionality and update subscription handling
- Removed the resubscribe_trigger method and its associated request entity. - Updated subscription parameters to streamline the subscribe and unsubscribe processes. - Enhanced the trigger provider interface to utilize the new subscription schema. - Adjusted GitHub provider implementation to align with the updated subscription structure.
This commit is contained in:
@@ -56,57 +56,59 @@ oauth_schema:
|
||||
en_US: "Access Token"
|
||||
|
||||
subscription_schema:
|
||||
- name: "repository"
|
||||
type: "text-input"
|
||||
required: true
|
||||
label:
|
||||
zh_Hans: "仓库"
|
||||
en_US: "Repository"
|
||||
placeholder:
|
||||
zh_Hans: "owner/repo"
|
||||
en_US: "owner/repo"
|
||||
help:
|
||||
en_US: "GitHub repository in format owner/repo (e.g., microsoft/vscode)"
|
||||
pt_BR: "Repositório do GitHub no formato owner/repo (ex: microsoft/vscode)"
|
||||
zh_Hans: "GitHub 仓库,格式为 owner/repo(例如:microsoft/vscode)"
|
||||
- name: "events"
|
||||
type: "select"
|
||||
required: true
|
||||
default: ["issue_comment", "issues"]
|
||||
options:
|
||||
- value: "issue_comment"
|
||||
label:
|
||||
en_US: "Issue Comments"
|
||||
zh_Hans: "Issue 评论"
|
||||
- value: "issues"
|
||||
label:
|
||||
en_US: "Issues"
|
||||
zh_Hans: "Issues"
|
||||
- value: "pull_request"
|
||||
label:
|
||||
en_US: "Pull Requests"
|
||||
zh_Hans: "Pull Requests"
|
||||
- value: "push"
|
||||
label:
|
||||
en_US: "Push"
|
||||
zh_Hans: "推送"
|
||||
label:
|
||||
zh_Hans: "监听事件"
|
||||
en_US: "Events to Listen"
|
||||
help:
|
||||
en_US: "Select which GitHub events to subscribe to"
|
||||
pt_BR: "Selecione quais eventos do GitHub inscrever-se"
|
||||
zh_Hans: "选择要订阅的 GitHub 事件"
|
||||
- name: "webhook_secret"
|
||||
type: "secret-input"
|
||||
required: false
|
||||
label:
|
||||
zh_Hans: "Webhook Secret"
|
||||
en_US: "Webhook Secret"
|
||||
help:
|
||||
en_US: "Optional webhook secret for validating GitHub webhook requests"
|
||||
pt_BR: "Segredo opcional do webhook para validar solicitações do webhook do GitHub"
|
||||
zh_Hans: "可选的用于验证 GitHub webhook 请求的 webhook 密钥"
|
||||
parameters_schema:
|
||||
- name: "repository"
|
||||
type: "text-input"
|
||||
required: true
|
||||
label:
|
||||
zh_Hans: "仓库"
|
||||
en_US: "Repository"
|
||||
placeholder:
|
||||
zh_Hans: "owner/repo"
|
||||
en_US: "owner/repo"
|
||||
help:
|
||||
en_US: "GitHub repository in format owner/repo (e.g., microsoft/vscode)"
|
||||
pt_BR: "Repositório do GitHub no formato owner/repo (ex: microsoft/vscode)"
|
||||
zh_Hans: "GitHub 仓库,格式为 owner/repo(例如:microsoft/vscode)"
|
||||
- name: "events"
|
||||
type: "select"
|
||||
required: true
|
||||
default: ["issue_comment", "issues"]
|
||||
options:
|
||||
- value: "issue_comment"
|
||||
label:
|
||||
en_US: "Issue Comments"
|
||||
zh_Hans: "Issue 评论"
|
||||
- value: "issues"
|
||||
label:
|
||||
en_US: "Issues"
|
||||
zh_Hans: "Issues"
|
||||
- value: "pull_request"
|
||||
label:
|
||||
en_US: "Pull Requests"
|
||||
zh_Hans: "Pull Requests"
|
||||
- value: "push"
|
||||
label:
|
||||
en_US: "Push"
|
||||
zh_Hans: "推送"
|
||||
label:
|
||||
zh_Hans: "监听事件"
|
||||
en_US: "Events to Listen"
|
||||
help:
|
||||
en_US: "Select which GitHub events to subscribe to"
|
||||
pt_BR: "Selecione quais eventos do GitHub inscrever-se"
|
||||
zh_Hans: "选择要订阅的 GitHub 事件"
|
||||
properties_schema:
|
||||
- name: "webhook_secret"
|
||||
type: "secret-input"
|
||||
required: false
|
||||
label:
|
||||
zh_Hans: "Webhook Secret"
|
||||
en_US: "Webhook Secret"
|
||||
help:
|
||||
en_US: "Optional webhook secret for validating GitHub webhook requests"
|
||||
pt_BR: "Segredo opcional do webhook para validar solicitações do webhook do GitHub"
|
||||
zh_Hans: "可选的用于验证 GitHub webhook 请求的 webhook 密钥"
|
||||
|
||||
triggers:
|
||||
- triggers/issue_comment.yaml
|
||||
|
||||
Reference in New Issue
Block a user