validate-pr

v2026.09.24

Validate the current Pull Request branch name, body, and status against Marshroom conventions

GitHub
安装命令
npx skhub add vkehfdl1/validate-pr
Markdown
SKILL.md

Validate the current Pull Request against Marshroom conventions.

Steps:

  1. Read ${MARSHROOM_STATE:-~/.config/marshroom/state.json} and parse the JSON
  2. Run git branch --show-current to get the current branch name
  3. Find the cart entry whose branchName matches the current git branch. If no match, tell the user they're not on a cart issue branch
  4. Get the current PR info: gh pr view --json title,body,headRefName
  5. Validate the following:

Branch Name Check:

  • The PR's head branch should match the matched cart entry's branchName
  • Expected format: Feature/#N or HotFix/#N
  • If mismatched, show: "Branch mismatch: expected '{branchName}', got '{actual}'"

PR Body Check:

  • The body MUST contain close #{issueNumber}
  • If missing, suggest: gh pr edit --body "$(gh pr view --json body -q '.body')\n\nclose #<issueNumber>"

Status Check:

  • Read the status field from the matched cart entry
  • After PR creation, status should be "pending"
  • If status is still "running", warn that the status was not updated (suggest running marsh pr)
  • If status is "soon", warn that /start-issue may not have been run

Summary:

  • Show pass/fail status for each check
  • If all checks pass, confirm the PR is valid
  • If any check fails, provide the fix commands
发现
标签

此技能尚未发布标签。

版本
最新版本元数据

版本

v2026.09.24

发布时间

2026年9月24日

分类

未分类

许可证

未指定

源路径

marshroom-skills/skills/validate-pr

默认分支

main

最新提交

6dabba4

Tree SHA

6572378