AgentSkillsCN

check-my-prs

查看您的开放 MR,了解评审者的反馈。显示需要回复的 MR、等待评审的 MR、管道失败的 MR、需要变基的 MR,以及已获批准的 MR。适用于您想查看 PR 状态、任何 MR 的反馈,或在创建更多 MR 之前使用。

SKILL.md
--- frontmatter
name: check-my-prs
description: Check your open MRs for feedback from reviewers. Shows MRs needing response, awaiting review, pipeline failed, needs rebase, and approved. Use when you want to see PR status, any MR feedback, or before creating more MRs.

Check My PRs

Check your open MRs for feedback and status.

Inputs

InputTypeDefaultPurpose
projectstring-GitLab project (resolved from repo_name/cwd)
repo_namestring-Config repo name
show_approvedbooltrueInclude approved MRs
auto_mergeboolfalseAuto-merge approved MRs
auto_rebaseboolfalseAuto-rebase MRs with conflicts
slack_formatboolfalseSlack link format

Workflow

1. Load Persona

  • persona_load("developer")

2. Resolve Project

  • projectrepo_name from config → cwd → session project → default automation-analytics/automation-analytics-backend

3. Get Username

  • config.user.username or USER env

4. List My MRs

  • gitlab_mr_list(project, state="opened", author="{my_username}")
  • Parse with parse_mr_list (shared parser)

5. Check First MR

  • gitlab_mr_view(project, mr_id="{first_mr.iid}")
  • Use analyze_mr_status (shared parser): status = needs_response | approved | pipeline_failed | needs_rebase | awaiting

6. Get Feedback Details (if needs_response)

  • gitlab_mr_view again for full comments

7. Auto-rebase (if auto_rebase and needs_rebase)

  • skill_run("rebase_pr", '{"mr_id": {iid}, "force_push": false}')

8. Build Summary

  • Needs Your Response: reviewers, unresolved discussions
  • Needs Rebase: merge conflicts
  • Pipeline Failed: fix CI
  • Awaiting Review: no feedback yet
  • Approved: ready to merge

9. Memory

  • Update state/current_workopen_mrs with pipeline_status, needs_review
  • memory_session_log("Checked {count} PRs", "First MR status: {status}")

10. Learn from Failures

  • VPN: learn_tool_fix("gitlab_mr_list", "no such host", "VPN", "vpn_connect()")
  • Merge conflict: learn_tool_fix("gitlab_mr_merge", "merge conflict", "Conflicts", "skill_run rebase_pr")

MCP Tools

  • persona_load
  • gitlab_mr_list
  • gitlab_mr_view
  • skill_run (rebase_pr)
  • memory_session_log
  • memory_update (state/current_work)
  • learn_tool_fix

Output

  • Categorized MRs with links
  • Quick actions: view comments, merge, rebase
  • PR best practices, known issues