push-to-pr
0
总安装量
1
周安装量
安装命令
npx skills add https://github.com/project-n-e-k-o/n.e.k.o --skill push-to-pr
Agent 安装分布
amp
1
cline
1
opencode
1
cursor
1
continue
1
kimi-cli
1
Skill 文档
Push to PR
Push local commits to an existing PR’s source branch. Never create new branches.
Workflow
1. Find PR head branch
curl -s https://api.github.com/repos/{OWNER}/{REPO}/pulls/{N} \
| python3 -c "import sys,json; p=json.load(sys.stdin); print(f\"branch={p['head']['ref']}\nclone_url={p['head']['repo']['clone_url']}\ncan_modify={p['maintainer_can_modify']}\")"
head.ref= branch name (e.g.active_visual_chat)head.repo.clone_url= fork URLmaintainer_can_modifymust betrue
2. Ensure remote exists
git remote -v # check if clone_url already listed
git remote add <name> <clone_url> # only if missing
3. Fetch + rebase if needed
git fetch <remote> <branch>
# If local commits not on top:
git rebase <remote>/<branch>
4. Push
git push <remote> HEAD:<branch>
Critical Rules
- NEVER create new branches on any remote
- NEVER
git push <remote> <local_branch>if local branch differs from PR branch â always useHEAD:<pr_branch> - Branch name comes only from
head.refin API response - If
maintainer_can_modifyisfalse, inform user â cannot push - If push rejected (non-fast-forward), fetch and rebase first