AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Merge Pr Check

skill-oschina-gitee-agent-skills-merge-pr-check · by oschina

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 Server to be configured.

No reviews yet
0 installs
18 views
0.0% view→install

Install

$ agentstack add skill-oschina-gitee-agent-skills-merge-pr-check

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access Used
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-oschina-gitee-agent-skills-merge-pr-check)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
5mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Merge Pr Check? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

> 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_comments (resource_type: pull), 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_comments (resource_type: pull) 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)

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.