Files
dify-plugin-sdks/python/examples/github_trigger/triggers/issue_comment.yaml
T
Harry 22f156e9b2 feat(trigger): enhance GitHub trigger with multiple event selection and dynamic parameter options
- Updated `IssueCommentTrigger` and `GithubProvider` to support multiple event selections for GitHub triggers.
- Introduced a new `multiple` field in the trigger parameters to allow users to select multiple events.
- Implemented dynamic fetching of repository options based on OAuth credentials.
- Bumped version in `manifest.yaml` to 0.0.7 to reflect these enhancements.

This update improves the flexibility and usability of the GitHub trigger integration.
2025-09-08 23:42:33 +08:00

166 lines
4.8 KiB
YAML

identity:
name: issue_comment
author: langgenius
label:
en_US: Issue Comment Event
zh_Hans: Issue 评论事件
pt_BR: Evento de Comentário de Issue
description:
human:
en_US: Triggers when someone comments on an issue or pull request
zh_Hans: 当有人在 issue 或 pull request 上评论时触发
pt_BR: Dispara quando alguém comenta em uma issue ou pull request
llm:
en_US: This trigger activates when a comment is created, edited, or deleted on a GitHub issue or pull request, providing information about the comment, issue, and user.
zh_Hans: 当在 GitHub issue 或 pull request 上创建、编辑或删除评论时,此触发器会被激活,提供有关评论、issue 和用户的信息。
pt_BR: Este gatilho é ativado quando um comentário é criado, editado ou deletado em uma issue ou pull request do GitHub, fornecendo informações sobre o comentário, issue e usuário.
parameters:
- name: "events"
type: "select"
required: true
default: ["issue_comment", "issues"]
multiple: true
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: action_filter
label:
en_US: Action Filter
zh_Hans: 动作过滤器
pt_BR: Filtro de Ação
type: select
required: false
default: "any"
options:
- value: "any"
label:
en_US: Any Action
zh_Hans: 任何动作
- value: "created"
label:
en_US: Created
zh_Hans: 创建
- value: "edited"
label:
en_US: Edited
zh_Hans: 编辑
- value: "deleted"
label:
en_US: Deleted
zh_Hans: 删除
description:
en_US: Filter by comment action type
zh_Hans: 按评论动作类型过滤
pt_BR: Filtrar por tipo de ação do comentário
- name: issue_filter
label:
en_US: Issue Number Filter
zh_Hans: Issue 编号过滤器
pt_BR: Filtro de Número da Issue
type: number
required: false
description:
en_US: Filter by specific issue number (optional)
zh_Hans: 按特定 issue 编号过滤(可选)
pt_BR: Filtrar por número específico da issue (opcional)
output_schema:
type: object
properties:
action:
type: string
description: The action performed on the comment (created, edited, deleted)
comment:
type: object
properties:
id:
type: number
description: The ID of the comment
body:
type: string
description: The content of the comment
html_url:
type: string
description: The URL to view the comment on GitHub
created_at:
type: string
description: When the comment was created
updated_at:
type: string
description: When the comment was last updated
issue:
type: object
properties:
number:
type: number
description: The issue number
title:
type: string
description: The issue title
state:
type: string
description: The issue state (open, closed)
html_url:
type: string
description: The URL to view the issue on GitHub
body:
type: string
description: The issue description
labels:
type: array
description: Labels attached to the issue
is_pull_request:
type: boolean
description: Whether this is a pull request
repository:
type: object
properties:
name:
type: string
description: The repository name
full_name:
type: string
description: The full repository name (owner/repo)
html_url:
type: string
description: The repository URL
sender:
type: object
properties:
login:
type: string
description: The username of the comment author
avatar_url:
type: string
description: The avatar URL of the comment author
html_url:
type: string
description: The profile URL of the comment author
extra:
python:
source: triggers/issue_comment.py