ship-pr
Ship PR
Escort finished work from the current worktree to a merged pull request on the repository's forge (the service that hosts the repository: GitHub, Forgejo, or Gitea).
Forge and tool
Read the host from the origin remote URL. Treat github.com as GitHub. For any other host, run gh auth status --hostname <host>, and run tea whoami with the tea login configured for that host. Use the one tool whose probe succeeds. If neither probe or both probes succeed, stop and ask the user which forge and tool to use.
Use gh on GitHub. Use tea on Forgejo or Gitea. Where this skill names a gh command, run the tea equivalent:
tea whoamiverifies authentication.tea pr lslists open pull requests.tea pr createcreates a pull request.tea api <endpoint>sends an authenticated request to the forge API.teafills{owner}and{repo}from the repository context. Replace<index>,<sha>, and<base>yourself with the pull request index, the head commit SHA, and the percent-encoded base branch name.tea api /repos/{owner}/{repo}/pulls/<index>returnsstate,head.sha,mergeable,merged, andmerged_at.tea api /repos/{owner}/{repo}/pulls/<index>/reviewsreturns each review with itsstate,dismissed, andstaleflags.tea api /repos/{owner}/{repo}/commits/<sha>/statusreturns the combined commit status.tea api /repos/{owner}/{repo}/branches/<base>returns the base branch with its effective protection:protected,required_approvals,enable_status_check, andstatus_check_contexts.
On Forgejo or Gitea, decide the gates from these responses. A review gate is open when a non-dismissed review has state REQUEST_CHANGES, or when the count of reviews with state APPROVED, dismissed false, and stale false is below required_approvals. A status gate is open when enable_status_check is true and any context in status_check_contexts is absent from the combined status or is not success. These fields do not cover every protection policy, for example official-review requests or approval whitelists. When they do not explain a refusal that the forge reports, report that gate as unverified and keep polling.