git-ship

Full commit-to-merge flow with CI bypassed via GitHub Actions API.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "git-ship" with this command: npx skills add molechowski/claude-skills/molechowski-claude-skills-git-ship

Commit PR CI Merge

Full commit-to-merge flow with CI bypassed via GitHub Actions API.

Workflow

  1. Detect repo → 2. Disable workflows → 3. Branch → 4. Commit → 5. Push → 6. PR → 7. Merge → 8. Re-enable workflows → 9. Cleanup

Steps

  1. Detect Repository

Extract owner and repo from git remote:

gh repo view --json owner,name --jq '[.owner.login, .name] | @tsv'

Store as OWNER and REPO for all subsequent gh api calls.

  1. List and Disable Workflows

Get all active workflows:

gh api repos/{OWNER}/{REPO}/actions/workflows --jq '.workflows[] | select(.state=="active") | [.id, .name] | @tsv'

Disable each PR-triggered workflow:

gh api repos/{OWNER}/{REPO}/actions/workflows/{ID}/disable -X PUT

Track disabled workflow IDs for re-enabling later. Only disable workflows that trigger on pull_request or push events. If unsure, disable all active workflows.

  1. Create Feature Branch

If on main/master, create a branch. Use /commit skill conventions for branch naming:

git checkout -b chore/short-description

  1. Commit

Use /commit skill for message generation.

Skill(skill="commit")

  1. Push

git push -u origin $(git branch --show-current)

  1. Create PR

Use /pr-create skill for PR creation. Add a note in the PR body that CI was skipped.

Skill(skill="pr-create")

  1. Merge via API

First attempt: merge using the GitHub API with --admin flag:

gh pr merge {PR_NUMBER} --squash --admin

If merge fails with review requirement error (HTTP 405 or "approving review is required"):

  • Save current review protection settings:

gh api repos/{OWNER}/{REPO}/branches/main/protection/required_pull_request_reviews --jq '{dismiss_stale_reviews, require_code_owner_reviews, require_last_push_approval, required_approving_review_count}'

  • Temporarily remove review requirement:

gh api repos/{OWNER}/{REPO}/branches/main/protection/required_pull_request_reviews -X DELETE

  • Merge:

gh pr merge {PR_NUMBER} --squash --admin

  • Restore review protection using saved settings (use --input - with JSON to preserve boolean types):

gh api repos/{OWNER}/{REPO}/branches/main/protection/required_pull_request_reviews -X PATCH --input - <<'EOF' {saved settings JSON} EOF

CRITICAL: Always restore branch protection, even if the merge fails. Use the saved settings from step 1 to restore the exact original configuration.

  1. Re-enable Workflows

Re-enable all previously disabled workflows:

gh api repos/{OWNER}/{REPO}/actions/workflows/{ID}/enable -X PUT

  1. Local Cleanup

git checkout main && git pull && git branch -d {BRANCH_NAME}

Safety

  • Never skip CI for code changes that affect behavior

  • Always re-enable workflows, even if merge fails

  • Track disabled workflow IDs to ensure none are left disabled

  • Appropriate for: renames, typos, config changes, documentation

  • Not appropriate for: feature code, security changes, dependency updates

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

dev-review-pr

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

cli-web-scrape

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

dev-rlm

No summary provided by upstream source.

Repository SourceNeeds Review