{"skill":{"slug":"gitee-merge-pr-check","displayName":"Merge Pr Check","summary":"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...","description":"---\nname: merge-pr-check\ndescription: 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.\nversion: 1.0.0\nrequires:\n  mcp-servers:\n    - gitee\n---\n\n> **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.\n\n# Merge PR Check via Gitee MCP\n\nCheck whether a Pull Request meets the criteria for merging, then execute the merge after confirmation.\n\n## Prerequisites\n\n- Gitee MCP Server configured (tools: `get_pull_detail`, `list_pull_comments`, `get_diff_files`, `merge_pull`)\n- User must provide: repository owner, repository name, PR number\n\n## Steps\n\n### Step 1: Fetch PR Status\n\nUse `get_pull_detail` to retrieve PR details and check:\n\n**Basic status**\n- Whether the PR is open (stop if already closed/merged)\n- Whether it is a Draft — if so, inform the user it must be converted to a regular PR first\n- Whether source and target branches are correct\n\n**Pre-merge checklist**\n- Whether the PR has a description explaining the purpose of the changes\n- Whether a reviewer has been assigned\n\n### Step 2: Analyze Comments and Review Feedback\n\nUse `list_pull_comments` to retrieve all comments and check:\n- Whether any reviewer has explicitly objected to merging (e.g., \"NACK\", \"needs changes\", \"do not merge\")\n- Whether there are unresolved discussions (questions raised but not replied to)\n- Whether there are any LGTM or Approved responses\n\n### Step 3: Quick Diff Check\n\nUse `get_diff_files` to inspect changed files:\n- Whether there are obvious omissions (e.g., code changed but related config not updated)\n- Whether unexpected files are included (debug code, temp files)\n- Whether the scope of changes matches the PR description\n\n### Step 4: Provide Merge Recommendation\n\nBased on the checks above, output a merge assessment report:\n\n```\n## PR Merge Check Report\n\n**PR**: #[number] [title]\n**Status**: [Open/Draft/Closed]\n\n### Checklist\n\n✅ PR is in Open state\n✅ Has a change description\n⚠️  No reviewer approval yet\n✅ Diff scope is reasonable\n\n### Conclusion\n\n[Ready to merge / Recommend waiting for review / Not recommended to merge]\n\nReason: [Specific explanation]\n```\n\n### Step 5: Execute Merge (requires user confirmation)\n\nIf the checks pass, ask the user to confirm the merge.\n\nAfter confirmation, use `merge_pull` with these parameters:\n- `merge_method`: merge strategy — `merge` (creates a merge commit), `squash` (squashes commits), or `rebase`\n  - Default recommendation: `merge`; suggest `squash` if the PR has many messy commits\n- `commit_message`: merge commit message (optional, defaults to PR title)\n\nAfter a successful merge, output the result and ask whether the user wants to delete the source branch.\n\n## Notes\n\n- Merging is irreversible — always wait for explicit user confirmation before proceeding\n- If there are conflicts, the Gitee API will return an error — prompt the user to resolve conflicts first\n- It is recommended to confirm that CI has passed before merging (check the PR's status checks)\n","tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":627,"installsAllTime":1,"installsCurrent":1,"stars":0,"versions":1},"createdAt":1773037623845,"updatedAt":1778491784317},"latestVersion":{"version":"1.0.0","createdAt":1773037623845,"changelog":"merge-pr-check 1.0.0 initial release:\n\n- Checks if a Gitee Pull Request is ready to merge using MCP server.\n- Reviews PR status, description, assigned reviewers, and draft state.\n- Analyzes review comments and approvals for outstanding objections or unresolved issues.\n- Checks file diffs for missing or unwanted changes.\n- Provides a clear merge readiness assessment and summary report.\n- Waits for user confirmation before merging, then handles the merge and optional branch deletion.","license":"MIT-0"},"metadata":null,"owner":{"handle":"oschina","userId":"s170b4k73yp0tc71sr7bagqjs1884q2n","displayName":"开源中国","image":"https://avatars.githubusercontent.com/u/1540855?v=4"},"moderation":null}