Skip to content

Instantly share code, notes, and snippets.

import jwt
import requests
from time import time
pem_file = '/path/to/github.pem' # the absolute path to your Application Pem Certificate issued by GitHub
integration_id = 0 # GitHub Application Integration ID
installation_id = 0 # once installed on an organization. The Organization Integration ID
expire_seconds = 500 # number of seconds the jwt token expires (max ~600 but not designated by GitHub)
slug = 'owner/repo' # name of repo for demo purposes