# 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.
