mirror of
https://github.com/langgenius/dify-plugin-sdks.git
synced 2026-07-22 10:25:23 -04:00
376 lines
9.5 KiB
YAML
376 lines
9.5 KiB
YAML
identity:
|
|
name: pull_request
|
|
author: langgenius
|
|
label:
|
|
en_US: Pull Request (Unified)
|
|
zh_Hans: 拉取请求(统一)
|
|
ja_JP: プルリクエスト(統合)
|
|
|
|
description:
|
|
en_US: Unified pull_request event with actions filter
|
|
zh_Hans: 带 actions 过滤的统一 pull_request 事件
|
|
ja_JP: アクションフィルタ付きの統合 pull_request イベント
|
|
|
|
parameters:
|
|
- name: actions
|
|
label:
|
|
en_US: Actions
|
|
zh_Hans: 动作
|
|
ja_JP: アクション
|
|
type: select
|
|
required: false
|
|
multiple: true
|
|
default:
|
|
- opened
|
|
- edited
|
|
- closed
|
|
- reopened
|
|
- synchronize
|
|
- ready_for_review
|
|
- converted_to_draft
|
|
options:
|
|
- value: opened
|
|
label:
|
|
en_US: Opened
|
|
zh_Hans: 打开
|
|
ja_JP: オープン
|
|
- value: edited
|
|
label:
|
|
en_US: Edited
|
|
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: synchronize
|
|
label:
|
|
en_US: Synchronize
|
|
zh_Hans: 同步
|
|
ja_JP: 同期
|
|
- value: ready_for_review
|
|
label:
|
|
en_US: Ready for Review
|
|
zh_Hans: 准备审查
|
|
ja_JP: レビュー準備
|
|
- value: converted_to_draft
|
|
label:
|
|
en_US: Converted to Draft
|
|
zh_Hans: 转为草稿
|
|
ja_JP: ドラフトへ変更
|
|
description:
|
|
en_US: Multi select filter for PR actions. Leave empty to accept all actions. Implemented by matching payload action.
|
|
zh_Hans: 多选过滤 PR 动作。留空表示不过滤。通过匹配 payload 的 action 字段实现。
|
|
ja_JP: PR のアクションを複数選択で絞り込み。未設定なら全て許可。ペイロード action で判定。
|
|
|
|
- name: base_branch
|
|
label:
|
|
en_US: Base Branch
|
|
zh_Hans: 基准分支
|
|
ja_JP: ベースブランチ
|
|
type: string
|
|
required: false
|
|
description:
|
|
en_US: Filter by base branch name. Comma separated values supported.
|
|
zh_Hans: 按基础分支名过滤。支持逗号分隔多值。
|
|
ja_JP: ベースブランチ名でフィルタ。カンマ区切りで複数指定可。
|
|
|
|
- name: head_branch
|
|
label:
|
|
en_US: Head Branch
|
|
zh_Hans: 头部分支
|
|
ja_JP: ヘッドブランチ
|
|
type: string
|
|
required: false
|
|
description:
|
|
en_US: Filter by head branch name. Comma separated values supported.
|
|
zh_Hans: 按头部分支名过滤。支持逗号分隔多值。
|
|
ja_JP: ヘッドブランチ名でフィルタ。カンマ区切りで複数指定可。
|
|
|
|
- name: author
|
|
label:
|
|
en_US: Author
|
|
zh_Hans: 作者
|
|
ja_JP: 作成者
|
|
type: string
|
|
required: false
|
|
description:
|
|
en_US: Comma separated PR author logins to include.
|
|
zh_Hans: 逗号分隔的 PR 作者登录名白名单。
|
|
ja_JP: PR 作成者のログインをカンマ区切りで指定。
|
|
|
|
- name: draft
|
|
label:
|
|
en_US: Draft Pull Request
|
|
zh_Hans: 草稿 Pull Request
|
|
ja_JP: ドラフトプルリクエスト
|
|
type: boolean
|
|
required: false
|
|
description:
|
|
en_US: Filter by PR draft state. True for draft only. False for non draft only. Leave empty to ignore.
|
|
zh_Hans: 按草稿状态过滤。true 仅草稿,false 仅非草稿,留空不限制。
|
|
ja_JP: ドラフト状態でフィルタ。true でドラフトのみ。false で非ドラフトのみ。未設定で無視。
|
|
|
|
- name: label_names
|
|
label:
|
|
en_US: Labels
|
|
zh_Hans: 标签
|
|
ja_JP: ラベル
|
|
type: string
|
|
required: false
|
|
description:
|
|
en_US: Require PR to contain these labels. Comma separated list of label names.
|
|
zh_Hans: PR 必须包含的标签名。逗号分隔列表。
|
|
ja_JP: PR に必須のラベル名。カンマ区切りで指定。
|
|
|
|
- name: reviewers
|
|
label:
|
|
en_US: Requested Reviewers
|
|
zh_Hans: 请求的审查者
|
|
ja_JP: レビュアー
|
|
type: string
|
|
required: false
|
|
description:
|
|
en_US: Comma separated requested reviewers logins. Trigger only when any matches.
|
|
zh_Hans: 逗号分隔的请求审查者登录名。任一命中即触发。
|
|
ja_JP: 要求されたレビュアーのログイン。カンマ区切りでいずれか一致で発火。
|
|
|
|
- name: pr_size_threshold
|
|
label:
|
|
en_US: PR Size Threshold
|
|
zh_Hans: PR 变更规模阈值
|
|
ja_JP: PR 規模のしきい値
|
|
type: string
|
|
required: false
|
|
description:
|
|
en_US: Numeric threshold for changed files or lines. Supports operators like >100 or >=10. Skipped if change counts missing.
|
|
zh_Hans: 变更规模阈值,支持 >100 或 >=10 等写法。若缺少变更统计将跳过此过滤。
|
|
ja_JP: 変更規模のしきい値。>100 や >=10 の形式に対応。変更数が無い場合はスキップ。
|
|
|
|
- name: changed_files_glob
|
|
label:
|
|
en_US: Changed Files Glob
|
|
zh_Hans: 变更文件匹配
|
|
ja_JP: 変更ファイルのグロブ
|
|
type: string
|
|
required: false
|
|
description:
|
|
en_US: Glob patterns for changed file paths. Comma separated patterns like src/**. Skipped if payload lacks file list.
|
|
zh_Hans: 变更文件路径的 Glob 模式。逗号分隔,如 src/**。若 payload 无文件列表则跳过。
|
|
ja_JP: 変更ファイルのグロブ。src/** のようにカンマ区切り。ファイル一覧が無い場合はスキップ。
|
|
|
|
- name: merged
|
|
label:
|
|
en_US: Merged (only for closed action)
|
|
zh_Hans: 是否合并(仅 closed 动作)
|
|
ja_JP: マージ済み(closed のみに適用)
|
|
type: boolean
|
|
required: false
|
|
description:
|
|
en_US: Only applies when action is closed. True to require merged PRs. False to require closed without merge.
|
|
zh_Hans: 仅在动作为 closed 时生效。true 仅匹配已合并,false 匹配未合并关闭。
|
|
ja_JP: action が closed のときのみ適用。true はマージ済み。false は未マージのクローズ。
|
|
|
|
output_schema:
|
|
type: object
|
|
properties:
|
|
action:
|
|
type: string
|
|
number:
|
|
type: integer
|
|
pull_request:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: integer
|
|
number:
|
|
type: integer
|
|
title:
|
|
type: string
|
|
state:
|
|
type: string
|
|
merged:
|
|
type: boolean
|
|
draft:
|
|
type: boolean
|
|
user:
|
|
type: object
|
|
properties:
|
|
login:
|
|
type: string
|
|
id:
|
|
type: integer
|
|
base:
|
|
type: object
|
|
properties:
|
|
ref:
|
|
type: string
|
|
sha:
|
|
type: string
|
|
head:
|
|
type: object
|
|
properties:
|
|
ref:
|
|
type: string
|
|
sha:
|
|
type: string
|
|
html_url:
|
|
type: string
|
|
format: uri
|
|
required:
|
|
- id
|
|
- number
|
|
- title
|
|
- state
|
|
- user
|
|
- base
|
|
- head
|
|
- html_url
|
|
repository:
|
|
type: object
|
|
description: Repository information
|
|
properties:
|
|
id:
|
|
type: integer
|
|
format: int64
|
|
node_id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
full_name:
|
|
type: string
|
|
private:
|
|
type: boolean
|
|
owner:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: integer
|
|
login:
|
|
type: string
|
|
node_id:
|
|
type: string
|
|
avatar_url:
|
|
type: string
|
|
format: uri
|
|
html_url:
|
|
type: string
|
|
format: uri
|
|
type:
|
|
type: string
|
|
enum:
|
|
- Bot
|
|
- User
|
|
- Organization
|
|
site_admin:
|
|
type: boolean
|
|
required:
|
|
- id
|
|
- login
|
|
html_url:
|
|
type: string
|
|
format: uri
|
|
description:
|
|
type:
|
|
- string
|
|
- "null"
|
|
fork:
|
|
type: boolean
|
|
url:
|
|
type: string
|
|
format: uri
|
|
created_at:
|
|
type: string
|
|
format: date-time
|
|
updated_at:
|
|
type: string
|
|
format: date-time
|
|
pushed_at:
|
|
type:
|
|
- string
|
|
- "null"
|
|
format: date-time
|
|
stargazers_count:
|
|
type: integer
|
|
watchers_count:
|
|
type: integer
|
|
language:
|
|
type:
|
|
- string
|
|
- "null"
|
|
forks_count:
|
|
type: integer
|
|
open_issues_count:
|
|
type: integer
|
|
default_branch:
|
|
type: string
|
|
topics:
|
|
type: array
|
|
items:
|
|
type: string
|
|
visibility:
|
|
type: string
|
|
enum:
|
|
- public
|
|
- private
|
|
- internal
|
|
required:
|
|
- id
|
|
- node_id
|
|
- name
|
|
- full_name
|
|
- private
|
|
- owner
|
|
- html_url
|
|
- url
|
|
- created_at
|
|
- updated_at
|
|
- fork
|
|
- default_branch
|
|
- visibility
|
|
sender:
|
|
type: object
|
|
description: The user who triggered the event
|
|
properties:
|
|
id:
|
|
type: integer
|
|
login:
|
|
type: string
|
|
node_id:
|
|
type: string
|
|
avatar_url:
|
|
type: string
|
|
format: uri
|
|
html_url:
|
|
type: string
|
|
format: uri
|
|
type:
|
|
type: string
|
|
enum:
|
|
- Bot
|
|
- User
|
|
- Organization
|
|
site_admin:
|
|
type: boolean
|
|
required:
|
|
- id
|
|
- login
|
|
- type
|
|
|
|
required:
|
|
- action
|
|
- number
|
|
- pull_request
|
|
- repository
|
|
- sender
|
|
|
|
extra:
|
|
python:
|
|
source: events/pull_request/pull_request.py
|