Files
dify-plugin-sdks/python/examples/github_trigger/triggers/issues.yaml
T
Harry 65da31647c feat(github_trigger): remove deprecated trigger files and add new issue trigger
- Deleted obsolete trigger files for various GitHub events including commit comments, create, delete, deployment, discussion, and others to streamline the trigger set.
- Introduced a new `issues.py` trigger to handle GitHub issue events, enhancing event handling capabilities.
- Added corresponding `issues.yaml` configuration to define the new trigger's properties and behavior.

These changes improve the overall functionality and maintainability of the GitHub trigger integration, ensuring a more efficient event handling process.
2025-09-25 17:18:29 +08:00

485 lines
15 KiB
YAML

identity:
name: issues
author: langgenius
label:
en_US: Issues
zh_Hans: 议题
ja_JP: イシュー
description:
human:
en_US: Triggers on issue events (opened, closed, reopened, edited, assigned, labeled, etc.)
zh_Hans: 在议题事件时触发(打开、关闭、重新打开、编辑、分配、标记等)
ja_JP: イシューイベント(作成、クローズ、再オープン、編集、担当者割り当て、ラベル付与など)でトリガーされます
llm:
en_US: This trigger activates on various GitHub issue events, providing comprehensive information about the issue, repository, and involved users.
zh_Hans: 此触发器在各种 GitHub 议题事件时激活,提供有关议题、仓库和相关用户的综合信息。
ja_JP: このトリガーは様々なGitHubイシューイベントで発動し、イシュー、リポジトリ、関係ユーザーの包括的な情報を提供します。
parameters:
- name: event
label:
en_US: Event
zh_Hans: 事件
ja_JP: イベント
type: select
required: false
options:
- value: opened
label:
en_US: Opened
zh_Hans: 新建议题
ja_JP: 作成
- value: closed
label:
en_US: Closed
zh_Hans: 议题关闭
ja_JP: クローズ
- value: reopened
label:
en_US: Reopened
zh_Hans: 关闭后再次开启
ja_JP: 再オープン
- value: edited
label:
en_US: Edited
zh_Hans: 议题内容被修改
ja_JP: 編集
- value: assigned
label:
en_US: Assigned
zh_Hans: 指定负责人
ja_JP: 担当者割り当て
- value: unassigned
label:
en_US: Unassigned
zh_Hans: 移除负责人
ja_JP: 担当者解除
- value: labeled
label:
en_US: Labeled
zh_Hans: 议题被打标签
ja_JP: ラベル付与
- value: unlabeled
label:
en_US: Unlabeled
zh_Hans: 议题标签被移除
ja_JP: ラベル削除
- value: milestoned
label:
en_US: Milestoned
zh_Hans: 设置目标里程碑
ja_JP: マイルストーン追加
- value: demilestoned
label:
en_US: Demilestoned
zh_Hans: 取消目标里程碑
ja_JP: マイルストーン削除
- value: pinned
label:
en_US: Pinned
zh_Hans: 议题被置顶
ja_JP: ピン留め
- value: unpinned
label:
en_US: Unpinned
zh_Hans: 议题取消置顶
ja_JP: ピン留め解除
- value: locked
label:
en_US: Locked
zh_Hans: 议题被锁定,无法评论
ja_JP: ロック
- value: unlocked
label:
en_US: Unlocked
zh_Hans: 议题解锁,允许评论
ja_JP: ロック解除
- value: transferred
label:
en_US: Transferred
zh_Hans: 议题转移到其他仓库
ja_JP: 転送
multiple: true
help:
en_US: "Select which issue actions to trigger on (leave empty for all)"
zh_Hans: "选择触发的议题操作(留空表示所有)"
ja_JP: "どのイシューアクションでトリガーするか選択してください(空欄ですべて)"
- name: labels
label:
en_US: Required Labels
zh_Hans: 必需标签
ja_JP: 必須ラベル
type: string
required: false
placeholder:
en_US: "e.g., bug, enhancement, urgent (comma-separated)"
zh_Hans: "例如:bug, enhancement, urgent(逗号分隔)"
ja_JP: "例: bug, enhancement, urgent(カンマ区切り)"
help:
en_US: "Only trigger if issue has these labels"
zh_Hans: "仅当议题有这些标签时触发"
ja_JP: "イシューがこれらのラベルを持つ場合のみトリガー"
- name: exclude_labels
label:
en_US: Exclude Labels
zh_Hans: 排除标签
ja_JP: 除外ラベル
type: string
required: false
placeholder:
en_US: "e.g., wontfix, duplicate (comma-separated)"
zh_Hans: "例如:wontfix, duplicate(逗号分隔)"
ja_JP: "例: wontfix, duplicate(カンマ区切り)"
help:
en_US: "Don't trigger if issue has these labels"
zh_Hans: "如果议题有这些标签则不触发"
ja_JP: "イシューがこれらのラベルを持つ場合はトリガーしない"
- name: assignee
label:
en_US: Assignee Filter
zh_Hans: 受理人过滤
ja_JP: 担当者フィルター
type: string
required: false
placeholder:
en_US: "e.g., username1, username2 (comma-separated)"
zh_Hans: "例如:username1, username2(逗号分隔)"
ja_JP: "例: username1, username2(カンマ区切り)"
help:
en_US: "Only trigger if assigned to these users"
zh_Hans: "仅当分配给这些用户时触发"
ja_JP: "これらのユーザーに割り当てられた場合のみトリガー"
- name: authors
label:
en_US: Authors
zh_Hans: 作者
ja_JP: 作成者
type: string
required: false
placeholder:
en_US: "e.g., user1, user2 (comma-separated)"
zh_Hans: "例如:user1, user2(逗号分隔)"
ja_JP: "例: user1, user2(カンマ区切り)"
help:
en_US: "Only trigger for issues from these authors"
zh_Hans: "仅对这些作者的议题触发"
ja_JP: "これらの作成者のイシューのみトリガー"
- name: exclude_authors
label:
en_US: Exclude Authors
zh_Hans: 排除作者
ja_JP: 除外作成者
type: string
required: false
placeholder:
en_US: "e.g., bot1, bot2 (comma-separated)"
zh_Hans: "例如:bot1, bot2(逗号分隔)"
ja_JP: "例: bot1, bot2(カンマ区切り)"
help:
en_US: "Don't trigger for issues from these authors"
zh_Hans: "不对这些作者的议题触发"
ja_JP: "これらの作成者のイシューはトリガーしない"
- name: milestone
label:
en_US: Milestone
zh_Hans: 里程碑
ja_JP: マイルストーン
type: string
required: false
placeholder:
en_US: "e.g., v1.0, v2.0 (comma-separated) (default: all)"
zh_Hans: "例如:v1.0, v2.0(逗号分隔)(默认所有)"
ja_JP: "例: v1.0, v2.0(カンマ区切り)(デフォルト: 全て)"
help:
en_US: "Only trigger for issues with these milestones"
zh_Hans: "仅对具有这些里程碑的议题触发"
ja_JP: "これらのマイルストーンのイシューのみトリガー"
- name: title_pattern
label:
en_US: Title Pattern
zh_Hans: 标题模式
ja_JP: タイトルパターン
type: string
required: false
placeholder:
en_US: "e.g., [BUG]*, [FEATURE]* (supports wildcards)"
zh_Hans: "例如:[BUG]*, [FEATURE]*(支持通配符)"
ja_JP: "例: [BUG]*, [FEATURE]*(ワイルドカード対応)"
help:
en_US: "Only trigger if title matches this pattern"
zh_Hans: "仅当标题匹配此模式时触发"
ja_JP: "タイトルがこのパターンに一致する場合のみトリガー"
- name: body_contains
label:
en_US: Body Contains
zh_Hans: 正文包含
ja_JP: 本文に含む
type: string
required: false
placeholder:
en_US: "e.g., regression, critical (comma-separated keywords)"
zh_Hans: "例如:regression, critical(逗号分隔的关键词)"
ja_JP: "例: regression, critical(カンマ区切りキーワード)"
help:
en_US: "Only trigger if body contains these keywords"
zh_Hans: "仅当正文包含这些关键词时触发"
ja_JP: "本文にこれらのキーワードが含まれる場合のみトリガー"
output_schema:
type: object
properties:
action:
type: string
description: The action that was performed on the issue (opened, edited, deleted, pinned, unpinned, closed, reopened, assigned, unassigned, labeled, unlabeled, locked, unlocked, transferred, milestoned, demilestoned)
issue:
type: object
description: The issue itself
properties:
id:
type: integer
description: Unique identifier of the issue
number:
type: integer
description: Number uniquely identifying the issue within its repository
title:
type: string
description: Title of the issue
body:
type: string
description: Contents of the issue
state:
type: string
description: State of the issue (open or closed)
state_reason:
type: string
description: The reason for the current state (completed, reopened, not_planned)
created_at:
type: string
description: When the issue was created (ISO 8601 format)
updated_at:
type: string
description: When the issue was last updated (ISO 8601 format)
closed_at:
type: string
description: When the issue was closed (ISO 8601 format), null if open
user:
type: object
description: The user who created the issue
properties:
login:
type: string
description: GitHub username
id:
type: integer
description: User ID
avatar_url:
type: string
description: Avatar URL
type:
type: string
description: User type (User, Bot, Organization)
assignees:
type: array
description: Users assigned to this issue
items:
type: object
properties:
login:
type: string
description: GitHub username
id:
type: integer
description: User ID
labels:
type: array
description: Labels associated with the issue
items:
type: object
properties:
id:
type: integer
description: Label ID
name:
type: string
description: The name of the label
color:
type: string
description: 6-character hex code, without the leading #
description:
type: string
description: Description of the label
milestone:
type: object
description: Milestone associated with the issue
properties:
id:
type: integer
description: Milestone ID
number:
type: integer
description: Milestone number
title:
type: string
description: The title of the milestone
description:
type: string
description: Description of the milestone
state:
type: string
description: State of the milestone (open or closed)
due_on:
type: string
description: When the milestone is due (ISO 8601 format)
created_at:
type: string
description: When the milestone was created
updated_at:
type: string
description: When the milestone was last updated
closed_at:
type: string
description: When the milestone was closed
locked:
type: boolean
description: Whether the issue is locked
comments:
type: integer
description: Number of comments on the issue
html_url:
type: string
description: URL to the issue on GitHub
url:
type: string
description: API URL for the issue
repository:
type: object
description: The repository where the issue was created
properties:
id:
type: integer
description: Repository ID
name:
type: string
description: The name of the repository
full_name:
type: string
description: The full name of the repository (owner/name)
private:
type: boolean
description: Whether the repository is private
owner:
type: object
description: Repository owner
properties:
login:
type: string
description: Owner username
id:
type: integer
description: Owner ID
type:
type: string
description: Owner type (User or Organization)
html_url:
type: string
description: URL to the repository on GitHub
description:
type: string
description: Repository description
fork:
type: boolean
description: Whether the repository is a fork
created_at:
type: string
description: When the repository was created
updated_at:
type: string
description: When the repository was last updated
pushed_at:
type: string
description: When the repository was last pushed to
language:
type: string
description: Primary language of the repository
default_branch:
type: string
description: Default branch of the repository
sender:
type: object
description: The user who triggered the event
properties:
login:
type: string
description: GitHub username
id:
type: integer
description: User ID
avatar_url:
type: string
description: Avatar URL
type:
type: string
description: User type (User, Bot, Organization)
assignee:
type: object
description: The assignee added or removed (only for assigned/unassigned events)
properties:
login:
type: string
description: GitHub username
id:
type: integer
description: User ID
label:
type: object
description: The label added or removed (only for labeled/unlabeled events)
properties:
id:
type: integer
description: Label ID
name:
type: string
description: The name of the label
color:
type: string
description: 6-character hex code, without the leading #
description:
type: string
description: Description of the label
changes:
type: object
description: Changes made in an edit (only for edited events)
properties:
title:
type: object
properties:
from:
type: string
description: Previous title
body:
type: object
properties:
from:
type: string
description: Previous body content
installation:
type: object
description: GitHub App installation (when triggered by a GitHub App)
properties:
id:
type: integer
description: Installation ID
extra:
python:
source: triggers/issues.py