mirror of
https://github.com/langgenius/dify-plugin-sdks.git
synced 2026-07-22 10:25:23 -04:00
c67ef57f10
- Added `TriggerIgnoreEventError` to handle cases where events should be ignored based on filter criteria. - Updated various GitHub trigger files to return relevant payload fields directly, improving data accessibility for event handling. - Enhanced the handling of event filtering in triggers to ensure only relevant events are processed. These changes improve the robustness and clarity of the GitHub trigger integration, allowing for better error management and data handling.
237 lines
7.8 KiB
YAML
237 lines
7.8 KiB
YAML
identity:
|
|
name: pull_request_closed
|
|
author: langgenius
|
|
label:
|
|
en_US: Pull Request Closed
|
|
zh_Hans: Pull Request 关闭
|
|
pt_BR: Pull Request Fechado
|
|
|
|
description:
|
|
human:
|
|
en_US: Triggers when a pull request is closed (merged or unmerged)
|
|
zh_Hans: 当 pull request 关闭时触发(合并或未合并)
|
|
pt_BR: Dispara quando um pull request é fechado (mesclado ou não mesclado)
|
|
llm:
|
|
en_US: This trigger activates when a pull request is closed on a GitHub repository, whether it was merged or closed without merging, providing information about the pull request, repository, and user who closed it.
|
|
zh_Hans: 当在 GitHub 仓库中关闭 pull request 时,此触发器会被激活,无论是合并还是未合并关闭,提供有关 pull request、仓库和关闭它的用户的信息。
|
|
pt_BR: Este gatilho é ativado quando um pull request é fechado em um repositório do GitHub, seja mesclado ou fechado sem mesclar, fornecendo informações sobre o pull request, repositório e usuário que o fechou.
|
|
|
|
parameters:
|
|
- name: merged_only
|
|
label:
|
|
en_US: Merged Only
|
|
zh_Hans: 仅已合并
|
|
pt_BR: Apenas Mesclados
|
|
type: boolean
|
|
required: false
|
|
default: false
|
|
help:
|
|
en_US: "Only trigger for merged pull requests"
|
|
zh_Hans: "仅对已合并的 Pull Request 触发"
|
|
pt_BR: "Disparar apenas para pull requests mesclados"
|
|
|
|
- name: target_branches
|
|
label:
|
|
en_US: Target Branch Filter
|
|
zh_Hans: 目标分支过滤
|
|
pt_BR: Filtro de Branch de Destino
|
|
type: string
|
|
required: false
|
|
placeholder:
|
|
en_US: "e.g., main, release/*, production (comma-separated, supports wildcards)"
|
|
zh_Hans: "例如:main, release/*, production(逗号分隔,支持通配符)"
|
|
pt_BR: "ex: main, release/*, production (separados por vírgula, suporta wildcards)"
|
|
help:
|
|
en_US: "Only trigger for PRs closed into these branches"
|
|
zh_Hans: "仅对合并到这些分支的 PR 触发"
|
|
pt_BR: "Disparar apenas para PRs fechados nestas branches"
|
|
|
|
- name: labels
|
|
label:
|
|
en_US: Label Filter
|
|
zh_Hans: 标签过滤
|
|
pt_BR: Filtro de Etiquetas
|
|
type: string
|
|
required: false
|
|
placeholder:
|
|
en_US: "e.g., ready-to-deploy, hotfix, feature (comma-separated)"
|
|
zh_Hans: "例如:ready-to-deploy, hotfix, feature(逗号分隔)"
|
|
pt_BR: "ex: ready-to-deploy, hotfix, feature (separados por vírgula)"
|
|
help:
|
|
en_US: "Only trigger for PRs with these labels"
|
|
zh_Hans: "仅对带有这些标签的 PR 触发"
|
|
pt_BR: "Disparar apenas para PRs com estas etiquetas"
|
|
|
|
- name: min_approvals
|
|
label:
|
|
en_US: Minimum Approvals
|
|
zh_Hans: 最少批准数
|
|
pt_BR: Aprovações Mínimas
|
|
type: number
|
|
required: false
|
|
placeholder:
|
|
en_US: "e.g., 2 (leave empty for no requirement)"
|
|
zh_Hans: "例如:2(留空表示不限制)"
|
|
pt_BR: "ex: 2 (deixe vazio para sem requisito)"
|
|
help:
|
|
en_US: "Only trigger if PR had at least this many approvals"
|
|
zh_Hans: "仅当 PR 有至少这么多批准时触发"
|
|
pt_BR: "Disparar apenas se o PR teve pelo menos este número de aprovações"
|
|
|
|
output_schema:
|
|
type: object
|
|
properties:
|
|
pull_request:
|
|
type: object
|
|
properties:
|
|
number:
|
|
type: number
|
|
description: The pull request number
|
|
title:
|
|
type: string
|
|
description: The pull request title
|
|
body:
|
|
type: string
|
|
description: The pull request description
|
|
state:
|
|
type: string
|
|
description: The pull request state (always "closed" for closed events)
|
|
html_url:
|
|
type: string
|
|
description: The URL to view the pull request on GitHub
|
|
created_at:
|
|
type: string
|
|
description: When the pull request was created
|
|
updated_at:
|
|
type: string
|
|
description: When the pull request was last updated
|
|
closed_at:
|
|
type: string
|
|
description: When the pull request was closed
|
|
merged_at:
|
|
type: string
|
|
description: When the pull request was merged (null if not merged)
|
|
draft:
|
|
type: boolean
|
|
description: Whether the pull request is a draft
|
|
merged:
|
|
type: boolean
|
|
description: Whether the pull request was merged
|
|
mergeable:
|
|
type: boolean
|
|
description: Whether the pull request is mergeable
|
|
labels:
|
|
type: array
|
|
description: Labels attached to the pull request
|
|
items:
|
|
type: object
|
|
properties:
|
|
name:
|
|
type: string
|
|
description: Label name
|
|
color:
|
|
type: string
|
|
description: Label color
|
|
description:
|
|
type: string
|
|
description: Label description
|
|
assignees:
|
|
type: array
|
|
description: Users assigned to the pull request
|
|
items:
|
|
type: object
|
|
properties:
|
|
login:
|
|
type: string
|
|
description: Assignee username
|
|
avatar_url:
|
|
type: string
|
|
description: Assignee avatar URL
|
|
html_url:
|
|
type: string
|
|
description: Assignee profile URL
|
|
author:
|
|
type: object
|
|
properties:
|
|
login:
|
|
type: string
|
|
description: The username of the pull request author
|
|
avatar_url:
|
|
type: string
|
|
description: The avatar URL of the pull request author
|
|
html_url:
|
|
type: string
|
|
description: The profile URL of the pull request author
|
|
head:
|
|
type: object
|
|
properties:
|
|
ref:
|
|
type: string
|
|
description: The head branch name
|
|
sha:
|
|
type: string
|
|
description: The head commit SHA
|
|
repo_name:
|
|
type: string
|
|
description: The head repository full name
|
|
base:
|
|
type: object
|
|
properties:
|
|
ref:
|
|
type: string
|
|
description: The base branch name
|
|
sha:
|
|
type: string
|
|
description: The base commit SHA
|
|
repo_name:
|
|
type: string
|
|
description: The base repository full name
|
|
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
|
|
description:
|
|
type: string
|
|
description: The repository description
|
|
private:
|
|
type: boolean
|
|
description: Whether the repository is private
|
|
owner:
|
|
type: object
|
|
properties:
|
|
login:
|
|
type: string
|
|
description: Repository owner username
|
|
avatar_url:
|
|
type: string
|
|
description: Repository owner avatar URL
|
|
html_url:
|
|
type: string
|
|
description: Repository owner profile URL
|
|
sender:
|
|
type: object
|
|
properties:
|
|
login:
|
|
type: string
|
|
description: The username who closed the pull request
|
|
avatar_url:
|
|
type: string
|
|
description: The avatar URL of the sender
|
|
html_url:
|
|
type: string
|
|
description: The profile URL of the sender
|
|
type:
|
|
type: string
|
|
description: The type of the sender (User, Bot, etc.)
|
|
|
|
extra:
|
|
python:
|
|
source: triggers/pull_request_closed.py |