Skip to main content

publishprs: Publish private pull requests in a public repo

Install:

pip install publishprs

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

lamin connect account/instance

Export API tokens for GitHub's API:

export GITHUB_SOURCE_TOKEN=...  # token with access to source repo, to process assets, needs to be a classic token
export GITHUB_TARGET_TOKEN=...  # token with access to target repo, to assign original user identity, should be fine-grained and issued by the original user account

Publish a PR:

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}")

Metadata

Release files for publishprs 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for publishprs 1.0.0
File Size Uploaded
publishprs-1.0.0.tar.gz 12.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for publishprs 1.0.0
File Interpreter ABI Platform
publishprs-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.6 kB

Release files / publishprs-1.0.0.tar.gz

Download URL publishprs-1.0.0.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1391f6f2dbfa5920682053be040f2b765824fd828a6656b14249f733070f6c5b
BLAKE2b-256 checksum
How to use checksums
a5fc4112da4143fb905940cf940d8e10d99a81ff53f487a8488c702e15dde3f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.5

Release files / publishprs-1.0.0-py3-none-any.whl

Download URL publishprs-1.0.0-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
485020f8ffad837ba0d7cc5b793acfe988a7c37c1996b4b4b506dae490312f55
BLAKE2b-256 checksum
How to use checksums
4919df60bc99ef55ade1a7a8063df408049afb97623e8482fa00b01a719ab085
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.5

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page