Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

jupyterlab/jupyterlab-bot

Jupyterlab Bot Service

This application is freely hosted on Heroku.

The application can be fount at this endpoint.

This application is heavily inspired by Conda Forge.

Usage

Cancelling duplicate builds

  • Duplicate builds on PRs are automatically cancelled after a timeout of some seconds to account for the time between the pull_request event and the start of the github actions workers.

Installing the WebHook

Install a webhook on your repo:

  • Payload URL: https://jupyterlab-bot.herokuapp.com/hooks/github
  • Content Type: application/json
  • Select Let me select invidual events
  • Select Pull requests and Pushes
  • Ensure Active is checked
  • Click Update webhook

Development

Installation

conda create --name jupyterlab-bot python>=3.6 pygithub tornado pre-commit --channel conda-forge
conda activate jupyterlab-bot
pip install -e .
pre-commit install

Local Usage

python run.py

Open a browser and search for http://localhost:5000/.

Also browse to /hooks/github and verify page render.

Release

You will need to have an account in both Heroku and Docker.

Log in to Heroku and get Docker credentials:

heroku login
heroku container:login

If creating, run:

heroku create jupyterlab-bot

Otherwise, run:

heroku git:remote -a jupyterlab-bot

Then run:

heroku container:push web
heroku container:release web
heroku open

Browse to /hooks/github and verify page render.

Heroku Configuration

You will need a Github token with access to cancel builds. This

This needs to be setup on the Heroku Application settings

On the Config Vars. section set a key GITHUB_ACCESS_TOKEN with the value of the generated token.