diff options
| author | nawfal <nawfal.fardana@dana.id> | 2026-05-30 17:14:43 +0700 |
|---|---|---|
| committer | Drew Ritter <drew@primeradiant.com> | 2026-06-16 10:09:44 -0700 |
| commit | 24ae4c800109494cb2fe06c110dd9f0da023de89 (patch) | |
| tree | ea88ffc01b8027ba4b7dcc39a78b78b9ab22f55f | |
| parent | 36ce0a21e409cfb3be498fae52e01a70589a04a6 (diff) | |
fix(finishing-a-development-branch): detect remote platform before creating PR/MR
Replaces hardcoded `gh pr create` in Option 2 with a platform-neutral
note: check `git remote get-url origin` first, then use gh (GitHub),
glab (GitLab), or fall back to the compare URL for unknown platforms.
Adds matching Red Flag entry so agents don't skip the detection step.
Fixes #1609
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| -rw-r--r-- | skills/finishing-a-development-branch/SKILL.md | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/skills/finishing-a-development-branch/SKILL.md b/skills/finishing-a-development-branch/SKILL.md index bb38fac..52d10a4 100644 --- a/skills/finishing-a-development-branch/SKILL.md +++ b/skills/finishing-a-development-branch/SKILL.md @@ -124,15 +124,11 @@ git branch -d <feature-branch> # Push branch git push -u origin <feature-branch> -# Create PR -gh pr create --title "<title>" --body "$(cat <<'EOF' -## Summary -<2-3 bullets of what changed> - -## Test Plan -- [ ] <verification steps> -EOF -)" +# Detect platform from remote URL, then create PR/MR with the matching tool: +# github.com → gh pr create --title "<title>" --body "<body>" +# gitlab.* → glab mr create --title "<title>" --description "<body>" +# unknown → open the compare URL printed by git push, or ask your human partner +REMOTE_URL=$(git remote get-url origin) ``` **Do NOT clean up worktree** — user needs it alive to iterate on PR feedback. @@ -240,6 +236,7 @@ git worktree prune # Self-healing: clean up any stale registrations - Remove a worktree before confirming merge success - Clean up worktrees you didn't create (provenance check) - Run `git worktree remove` from inside the worktree +- Use `gh pr create` without checking `git remote get-url origin` first — the repo may not be on GitHub **Always:** - Verify tests before offering options |
