Skip to main content

Pull Requests for JupyterLab

Project description


Build Status Version Version

A JupyterLab extension for reviewing pull requests.

For now, it supports GitHub and GitLab providers.


  • JupyterLab 2.x
  • nbdime 2.x

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


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


1. Install the extension with the following steps

pip install --upgrade jupyterlab-pullrequests
jupyter lab build

For GitLab, in addition, you will need to

pip install 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 or, you can set the API base URL of your provider with the configurable parameter PRConfig.api_base_url.


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 except if provider is gitlab then it defaults to



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

JupyterLab follows the official Jupyter Code of Conduct.


For a development install, do the following in the repository directory:

# Install dependencies
pip install -e .
# Activate the server extension
jupyter serverextension enable --sys-prefix jupyterlab_pullrequests
# Link your development version of the extension with JupyterLab
jupyter labextension install .
# Rebuild Typescript source after making changes
jlpm run build

To rebuild the package and the JupyterLab app:

jlpm run build
jupyter lab build

Project details

Download files

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

Files for jupyterlab-pullrequests, version 2.0.0
Filename, size File type Python version Upload date Hashes
Filename, size jupyterlab_pullrequests-2.0.0-py3-none-any.whl (122.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size jupyterlab_pullrequests-2.0.0.tar.gz (94.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page