← 返回 Skills 市场
oschina

Merge Pr Check

作者 开源中国 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
281
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install gitee-merge-pr-check
功能描述
Use this skill when the user asks to merge a PR, check if a PR is ready to merge, "merge PR", "can this PR be merged", "merge-pr-check". Requires Gitee MCP S...
使用说明 (SKILL.md)

Note: If you have mcporter installed locally, you should use mcporter to invoke the MCP tool instead of directly calling the MCP tool. The mcporter CLI provides a more convenient interface and better error handling.

Merge PR Check via Gitee MCP

Check whether a Pull Request meets the criteria for merging, then execute the merge after confirmation.

Prerequisites

  • Gitee MCP Server configured (tools: get_pull_detail, list_pull_comments, get_diff_files, merge_pull)
  • User must provide: repository owner, repository name, PR number

Steps

Step 1: Fetch PR Status

Use get_pull_detail to retrieve PR details and check:

Basic status

  • Whether the PR is open (stop if already closed/merged)
  • Whether it is a Draft — if so, inform the user it must be converted to a regular PR first
  • Whether source and target branches are correct

Pre-merge checklist

  • Whether the PR has a description explaining the purpose of the changes
  • Whether a reviewer has been assigned

Step 2: Analyze Comments and Review Feedback

Use list_pull_comments to retrieve all comments and check:

  • Whether any reviewer has explicitly objected to merging (e.g., "NACK", "needs changes", "do not merge")
  • Whether there are unresolved discussions (questions raised but not replied to)
  • Whether there are any LGTM or Approved responses

Step 3: Quick Diff Check

Use get_diff_files to inspect changed files:

  • Whether there are obvious omissions (e.g., code changed but related config not updated)
  • Whether unexpected files are included (debug code, temp files)
  • Whether the scope of changes matches the PR description

Step 4: Provide Merge Recommendation

Based on the checks above, output a merge assessment report:

## PR Merge Check Report

**PR**: #[number] [title]
**Status**: [Open/Draft/Closed]

### Checklist

✅ PR is in Open state
✅ Has a change description
⚠️  No reviewer approval yet
✅ Diff scope is reasonable

### Conclusion

[Ready to merge / Recommend waiting for review / Not recommended to merge]

Reason: [Specific explanation]

Step 5: Execute Merge (requires user confirmation)

If the checks pass, ask the user to confirm the merge.

After confirmation, use merge_pull with these parameters:

  • merge_method: merge strategy — merge (creates a merge commit), squash (squashes commits), or rebase
    • Default recommendation: merge; suggest squash if the PR has many messy commits
  • commit_message: merge commit message (optional, defaults to PR title)

After a successful merge, output the result and ask whether the user wants to delete the source branch.

Notes

  • Merging is irreversible — always wait for explicit user confirmation before proceeding
  • If there are conflicts, the Gitee API will return an error — prompt the user to resolve conflicts first
  • It is recommended to confirm that CI has passed before merging (check the PR's status checks)
安全使用建议
This skill appears coherent and limited to Gitee PR merge workflows. Before installing or enabling it: (1) verify the Gitee MCP Server it will call is correct and trusted (endpoint, owner, and access tokens) and that those credentials have least privilege (only the repos/actions needed). (2) Ensure you explicitly confirm merges — the skill correctly requests user confirmation before calling merge_pull. (3) Confirm CI/status checks are available in your PR metadata or otherwise validate CI before merging. (4) Because this is instruction-only, the skill itself does not embed code to inspect, so the runtime behavior depends on the MCP integration — audit that integration and its logs if you need an audit trail. If you do not want autonomous merges, keep autonomous invocation disabled or require an explicit human confirmation step in your agent policy.
功能分析
Type: OpenClaw Skill Name: gitee-merge-pr-check Version: 1.0.0 The skill bundle defines a standard workflow for reviewing and merging Gitee Pull Requests using the Gitee MCP server. It includes appropriate safety measures, such as requiring explicit user confirmation before merging and performing pre-merge checks on PR status, comments, and diffs (SKILL.md).
能力评估
Purpose & Capability
Name/description ask to check and merge PRs on Gitee; the SKILL.md explicitly requires a Gitee MCP Server and references MCP operations (get_pull_detail, list_pull_comments, get_diff_files, merge_pull) relevant to that purpose. There are no unrelated env vars, binaries, or config paths requested.
Instruction Scope
Instructions are scoped to fetching PR details, comments, diffs, producing a checklist, and (with explicit user confirmation) calling merge_pull. They do not direct reading local files, arbitrary environment variables, or sending data to unexpected external endpoints. The note to prefer mcporter (if present) is advisory and not risky by itself.
Install Mechanism
No install spec and no code files — instruction-only. Nothing is downloaded or written to disk by the skill itself.
Credentials
No environment variables or credentials declared by the skill. The only external dependency is the configured Gitee MCP Server; any credentials/access are expected to be part of that server configuration, which is proportional to the task.
Persistence & Privilege
always:false (default) and normal model invocation allowed. The skill does not request permanent presence or claim to modify other skills or system-wide settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install gitee-merge-pr-check
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /gitee-merge-pr-check 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
merge-pr-check 1.0.0 initial release: - Checks if a Gitee Pull Request is ready to merge using MCP server. - Reviews PR status, description, assigned reviewers, and draft state. - Analyzes review comments and approvals for outstanding objections or unresolved issues. - Checks file diffs for missing or unwanted changes. - Provides a clear merge readiness assessment and summary report. - Waits for user confirmation before merging, then handles the merge and optional branch deletion.
元数据
Slug gitee-merge-pr-check
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Merge Pr Check 是什么?

Use this skill when the user asks to merge a PR, check if a PR is ready to merge, "merge PR", "can this PR be merged", "merge-pr-check". Requires Gitee MCP S... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 281 次。

如何安装 Merge Pr Check?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install gitee-merge-pr-check」即可一键安装,无需额外配置。

Merge Pr Check 是免费的吗?

是的,Merge Pr Check 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Merge Pr Check 支持哪些平台?

Merge Pr Check 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Merge Pr Check?

由 开源中国(@oschina)开发并维护,当前版本 v1.0.0。

💬 留言讨论