Skip to main content

Publish private PRs.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

publishprs-0.3.1.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

publishprs-0.3.1-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file publishprs-0.3.1.tar.gz.

File metadata

  • Download URL: publishprs-0.3.1.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.5

File hashes

Hashes for publishprs-0.3.1.tar.gz
Algorithm Hash digest
SHA256 ae8e1ec247506a56b87f980599d60431c5f1aac12e7e6b125359aa5e4ad82ae1
MD5 7b6c88574e9779d03afaf12879f21262
BLAKE2b-256 d25db40e7d52590f066c535433a35c9b857cc080adb4826491e33471949a3a30

See more details on using hashes here.

File details

Details for the file publishprs-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: publishprs-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.5

File hashes

Hashes for publishprs-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eff1512c7396860998bd8f5a204e1ea13718dfae3e09b4a89af9d31fbbda9b2d
MD5 d7df809d9d6b908ab030e20b63ac1d3a
BLAKE2b-256 33cddd6b9f52757b7c35cc5c2da0d8756448945195861825613b27b98988ebd6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page