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.
262 lines
8.3 KiB
YAML
262 lines
8.3 KiB
YAML
identity:
|
|
name: pull_request_opened
|
|
author: langgenius
|
|
label:
|
|
en_US: Pull Request Opened
|
|
zh_Hans: Pull Request 打开
|
|
pt_BR: Pull Request Aberto
|
|
|
|
description:
|
|
human:
|
|
en_US: Triggers when a new pull request is opened
|
|
zh_Hans: 当新 pull request 打开时触发
|
|
pt_BR: Dispara quando um novo pull request é aberto
|
|
llm:
|
|
en_US: This trigger activates when a new pull request is opened on a GitHub repository, providing information about the pull request, repository, and user who opened it.
|
|
zh_Hans: 当在 GitHub 仓库中打开新 pull request 时,此触发器会被激活,提供有关 pull request、仓库和打开它的用户的信息。
|
|
pt_BR: Este gatilho é ativado quando um novo pull request é aberto em um repositório do GitHub, fornecendo informações sobre o pull request, repositório e usuário que o abriu.
|
|
|
|
parameters:
|
|
- 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, master, release/* (comma-separated, supports wildcards)"
|
|
zh_Hans: "例如:main, master, release/*(逗号分隔,支持通配符)"
|
|
pt_BR: "ex: main, master, release/* (separados por vírgula, suporta wildcards)"
|
|
help:
|
|
en_US: "Only trigger for PRs targeting these branches"
|
|
zh_Hans: "仅对合并到这些分支的 PR 触发"
|
|
pt_BR: "Disparar apenas para PRs direcionados a estes 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-for-review, needs-review (comma-separated)"
|
|
zh_Hans: "例如:ready-for-review, needs-review(逗号分隔)"
|
|
pt_BR: "ex: ready-for-review, needs-review (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: skip_draft
|
|
label:
|
|
en_US: Skip Draft PRs
|
|
zh_Hans: 跳过草稿 PR
|
|
pt_BR: Pular PRs de Rascunho
|
|
type: boolean
|
|
required: false
|
|
default: true
|
|
help:
|
|
en_US: "Ignore draft pull requests"
|
|
zh_Hans: "忽略草稿状态的 Pull Request"
|
|
pt_BR: "Ignorar pull requests em rascunho"
|
|
|
|
- name: exclude_authors
|
|
label:
|
|
en_US: Exclude Authors
|
|
zh_Hans: 排除作者
|
|
pt_BR: Excluir Autores
|
|
type: string
|
|
required: false
|
|
placeholder:
|
|
en_US: "e.g., dependabot[bot], renovate[bot] (comma-separated)"
|
|
zh_Hans: "例如:dependabot[bot], renovate[bot](逗号分隔)"
|
|
pt_BR: "ex: dependabot[bot], renovate[bot] (separados por vírgula)"
|
|
help:
|
|
en_US: "Ignore PRs from these authors"
|
|
zh_Hans: "忽略这些作者创建的 PR"
|
|
pt_BR: "Ignorar PRs destes autores"
|
|
|
|
- name: file_count_limit
|
|
label:
|
|
en_US: Max File Changes
|
|
zh_Hans: 最大文件变更数
|
|
pt_BR: Máximo de Arquivos Alterados
|
|
type: number
|
|
required: false
|
|
placeholder:
|
|
en_US: "e.g., 50 (leave empty for no limit)"
|
|
zh_Hans: "例如:50(留空表示不限制)"
|
|
pt_BR: "ex: 50 (deixe vazio para sem limite)"
|
|
help:
|
|
en_US: "Ignore PRs with more than this many files changed"
|
|
zh_Hans: "忽略变更文件数超过此值的 PR"
|
|
pt_BR: "Ignorar PRs com mais arquivos alterados que este valor"
|
|
|
|
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
|
|
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
|
|
draft:
|
|
type: boolean
|
|
description: Whether the pull request is a draft
|
|
merged:
|
|
type: boolean
|
|
description: Whether the pull request is 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
|
|
requested_reviewers:
|
|
type: array
|
|
description: Users requested to review the pull request
|
|
items:
|
|
type: object
|
|
properties:
|
|
login:
|
|
type: string
|
|
description: Reviewer username
|
|
avatar_url:
|
|
type: string
|
|
description: Reviewer avatar URL
|
|
html_url:
|
|
type: string
|
|
description: Reviewer 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 opened 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_opened.py |