---
name: ship-it-tests-to-pull-request
description: "Takes finished work from a local branch to an open pull request: current base, green tests, a reviewed diff, a version bump, tidy commits, and a clear PR. Use when a developer has a finished feature branch and needs it synced, tested, reviewed, committed in clean chunks, pushed, and opened as a pull request. Do not use for merging and deploying an approved pull request or fixing failing checks after the PR is open. Related topics: coding, devops."
---

# Ship It: Tests to Pull Request

Takes finished work from a local branch to an open pull request: current base, green tests, a reviewed diff, a version bump, tidy commits, and a clear PR.

## When to use

Use this skill when a developer has a finished feature branch and needs it synced, tested, reviewed, committed in clean chunks, pushed, and opened as a pull request. Do not use it for merging and deploying an approved pull request or fixing failing checks after the PR is open.

## Workflow

1. Ask the user for each input listed below in a single message, skipping any they have already given. Where options are listed, offer them, but accept other answers too.
2. Sync with the base branch and resolve conflicts so the branch merges cleanly.
3. Run the test command and stop to fix or report any failure before continuing.
4. Read the whole diff as a reviewer and remove debug code and unrelated edits.
5. Apply the chosen version bump and changelog entry, then commit in single-purpose chunks.
6. Push, open the pull request with summary, testing notes, and risks, and return the link.

## Inputs

- **Branch name** (free text, e.g. "Your working branch")
- **Base branch** (free text, e.g. "main")
- **Test command** (free text, e.g. "npm test")
- **Change summary** (longer free text)
- **Version bump** (choose one: None, Patch, Minor, Major)
- **Hosting platform** (choose one: GitHub, GitLab, Bitbucket)

## Output

The pull request link with a step-by-step checklist, the commit list, and the final PR title and body.

## Prompt template

Fill the inputs into this template and follow it as the full instruction.

### Ship It: Tests to Pull Request

Get my finished branch ready and open a pull request.

- Branch name: {{Branch name}}
- Base branch: {{Base branch}}
- Test command: {{Test command}}
- Change summary: {{Change summary}}
- Version bump: {{Version bump}}
- Hosting platform: {{Hosting platform}}

Work in this order and stop at the first failure. Sync with the base branch and resolve conflicts, keeping both sides' intent. Run the test command and fix or report failures; never skip a failing test. Review your own diff as a reviewer would: leftover debug code, unrelated changes, missing tests for new behaviour. Bump the version only as chosen and update the changelog if the project keeps one. Split the work into commits that each do one thing, with messages that say why. Push the branch and open the pull request with a title under 70 characters and a body containing summary, what changed, how it was tested, and any risk or follow-up. Return the PR link and a checklist showing each step done.

## Pitfalls

- Pushing with failing tests because the failure 'looks unrelated'.
- Committing everything in one lump, which makes review and reverts harder.
- Rebasing a branch others have pulled without saying so.
