Skip to content

Instantly share code, notes, and snippets.

@digikin
digikin / github-api-create-pull-request-end-to-end.py
Created August 6, 2022 04:03 — forked from nottrobin/github-api-create-pull-request-end-to-end.py
With Github API v3, create branch, commit a change to a file and open a pull request
#! /usr/bin/env python
from base64 import b64decode
from github import Github
with open('access-token.txt') as token_file:
token = token_file.read().strip()
api = Github(token)
site = api.get_repo('nottrobin/gh-cms-example-site')