Metadata-Version: 2.3
Name: publishprs
Version: 0.3.0
Summary: Publish private PRs.
Author-email: Lamin Labs <open-source@lamin.ai>
Requires-Python: >=3.10,<3.14
Description-Content-Type: text/markdown
Requires-Dist: lamindb
Requires-Dist: requests
Requires-Dist: dotenv
Requires-Dist: pre-commit ; extra == "dev"
Requires-Dist: nox ; extra == "dev"
Requires-Dist: pytest>=6.0 ; extra == "dev"
Requires-Dist: pytest-cov ; extra == "dev"
Requires-Dist: nbproject_test ; extra == "dev"
Project-URL: Home, https://github.com/laminlabs/publishprs
Provides-Extra: dev

# publishprs: Publish private pull requests in a public repo

Install:

```shell
pip install publishprs
```

Connect to the LaminDB instance to be used for assets management:

```shell
lamin connect account/instance
```

Publish a PR:

```python
from publishprs import Publisher
publisher = Publisher(
    source_repo="https://github.com/laminlabs/laminhub",
    target_repo="https://github.com/laminlabs/laminhub-public",
)
url = publisher.publish(pull_id=3820)
print(f"Published to: {url}")
```

Note that downloading assets from GitHub URLs of the form `https://github.com/user-attachments/assets/47729149-22a5-481b-beb4-69bb609ae054` neither works with the auto-generated `GITHUB_TOKEN` within GitHub Actions nor the fine-grained modern access tokens. A classic token is needed.

