Skip to main content

Pull Requests for JupyterLab

Project description

jupyterlab-pullrequests

Build Status NPM Version Pypi Version Conda Version

A JupyterLab extension for reviewing pull requests.

demo

For now, it supports GitHub and GitLab providers.

Prerequisites

For GitLab, you will need also diff-match-patch

Usage

  • Open the pull request extension from the tab on the left panel

Installation

1. Install the extension with the following steps

With pip:

pip install jupyterlab-pullrequests

Or with conda:

conda install -c conda-forge jupyterlab-pullrequests

For GitLab, in addition, you will need to

pip install diff-match-patch

Or with conda:

conda install -c conda-forge diff-match-patch

2. Getting your access token

For GitHub, the documentation is there. The token scope must be repo.

For GitLab, the documentation is there. The token scope must be api.

Remember that this token is effectively a password for your account. Do not share it online or check the token into version control, as people can use it to access all of your data.

3. Setting your access token in JupyterLab Pull Requests

You now need to add the credentials you got from the provider to your server configuration file. Instructions for generating a configuration file can be found here. Once you have identified this file, add the following lines to it:

c.PRConfig.access_token = '<YOUR_ACCESS_TOKEN>'

where "<YOUR_ACCESS_TOKEN>" is the string value you obtained above.

If you are using GitLab instead of GitHub, you also need to set the provider:

c.PRConfig.provider = 'gitlab'

Congrats, you did it! Launch JupyterLab and look for the Pull Request tab on the left! 🎉

If you are not using GitHub.com or GitLab.com, you can set the API base URL of your provider with the configurable parameter PRConfig.api_base_url.

Settings

This extension as server settings.

  • PRConfig.access_token: Access token to be authenticated by the provider
  • PRConfig.provider: github (default) or gitlab
  • PRConfig.api_base_url: Provider API base url (default to https://api.github.com except if provider is gitlab then it defaults to https://gitlab.com/api/v4/)

Troubleshooting

  • If you are seeing the following error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain and the certificates are installed on your machine, you will need to set the SSL_CERT_FILE environment variable to point to your system certificates bundle. For example:
export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt

Development

Contributing

If you would like to contribute to the project, please read our contributor documentation.

JupyterLab follows the official Jupyter Code of Conduct.

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

jupyterlab_pullrequests-3.0.0b0.tar.gz (240.4 kB view details)

Uploaded Source

Built Distribution

jupyterlab_pullrequests-3.0.0b0-py3-none-any.whl (466.1 kB view details)

Uploaded Python 3

File details

Details for the file jupyterlab_pullrequests-3.0.0b0.tar.gz.

File metadata

  • Download URL: jupyterlab_pullrequests-3.0.0b0.tar.gz
  • Upload date:
  • Size: 240.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.6.0.post20200917 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.6

File hashes

Hashes for jupyterlab_pullrequests-3.0.0b0.tar.gz
Algorithm Hash digest
SHA256 88457c1520b556e35f3dabac5d66749c0a5aafc3373e86188509c29773ef9c4a
MD5 7d1cd553a9d1408c3aa2fb9b521bd091
BLAKE2b-256 6a68650e4d1d8b0cc408d7f09e654bc032af6ce15dd6a38a4a9198e0ec2ec39c

See more details on using hashes here.

File details

Details for the file jupyterlab_pullrequests-3.0.0b0-py3-none-any.whl.

File metadata

  • Download URL: jupyterlab_pullrequests-3.0.0b0-py3-none-any.whl
  • Upload date:
  • Size: 466.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.6.0.post20200917 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.6

File hashes

Hashes for jupyterlab_pullrequests-3.0.0b0-py3-none-any.whl
Algorithm Hash digest
SHA256 03e21a158bd38695821fd1c24ace7d46cbd3bb8f74ce3f3f9916a2b98d27d1c0
MD5 45f47553573a72f2f2c98db5122b6e12
BLAKE2b-256 6e92df4211be900658baf88d0bfb8217dadc88ded44a4e8bc53e98015b41faec

See more details on using hashes here.

Supported by

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