Metadata-Version: 2.4
Name: gh-cherry-pick
Version: 1.0.0
Summary: Cherry-pick commits across GitHub repositories using only the GitHub API - no local clone required
Project-URL: Homepage, https://github.com/PerchunPak/gh-cherry-pick
Author-email: PerchunPak <hi@perchun.it>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Version Control :: Git
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: attrs~=26.1.0
Requires-Dist: cyclopts~=4.10.0
Requires-Dist: httpx~=0.28.1
Requires-Dist: loguru~=0.7.3
Requires-Dist: trio~=0.33.0
Requires-Dist: typing-extensions~=4.15.0
Description-Content-Type: text/markdown

# GitHub cherry-pick

Cherry-pick commits across GitHub repositories using only the GitHub API - no local clone required.

## How it works

Uses the algorithm described by [Jim's Stack Overflow
answer](https://stackoverflow.com/a/58672227/22235705) to perform a cherry-pick
entirely through the GitHub REST API:

## Installation

Requires Python 3.10+, I recommend using [uv](https://docs.astral.sh/uv/), but
it will work fine with pip or anything else.

```bash
uv tool install gh-cherry-pick
```

Or run directly without installing:

```bash
uvx gh-cherry-pick --help
```

## Usage

```
gh-cherry-pick --target OWNER/REPO@BRANCH COMMITS...
```

**Arguments:**

| Argument | Format | Description |
|---|---|---|
| `--target` | `Owner/RepoName@branch` | Target repository and branch to apply the cherry-picks to |
| `COMMITS` | `Owner/RepoName/sha` | One or more commits to cherry-pick (short or full SHA) |
| `--token`, `-t` | string | GitHub token (falls back to `$GITHUB_TOKEN`) |

**Example:**

```bash
GITHUB_TOKEN=ghp_... gh-cherry-pick \
  --target MyOrg/nixpkgs@patched \
  NixOS/nixpkgs/3f5ba52cc4701bf341457dfe5f6cb58e0cbb7f83 \
  NixOS/nixpkgs/49ba75edefc8dc4fee45482f77a280ddd7121797
```

Multiple commits are applied in order, each building on the previous result.

## Development

```bash
uv sync
uv run pre-commit install
```

Then commit your changes and send a pull request!
