AGENT SKILL

merge

Squash-merge the open PR, pull master, and reset dev branch

License 许可
MIT
最近更新
2026-05-15
Stars
★ 1
Forks
0

01 前言 Front Matter

name
merge
description
Squash-merge the open PR, pull master, and reset dev branch
allowed-tools
Bash(git *, gh *)
disable-model-invocation
true

02 资源文件 3

03 SKILL.md 正文

Merge PR and Reset

Instructions

  1. Check the current branch with git branch --show-current. If not on dev, abort.

  2. Find the open PR for dev → master:

    gh pr list --head dev --base master --state open --json number,title,url
    

    If no open PR exists, abort with an error message.

  3. Squash-merge the PR:

    gh pr merge NUMBER --squash --delete-branch
    

    This will also delete the remote dev branch.

  4. Switch to master and pull:

    git checkout master
    git pull
    
  5. Delete the local dev branch if it still exists:

    git branch -D dev 2>/dev/null || true
    
  6. Report success with the merged PR URL and the new commit on master.

04 同仓库更多 Skills