Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import os
import json
import requests
repos = requests.get('').json()
for repo in repos:
protection = requests.get(
headers={"Authorization": "token {}".format(os.environ["GH_TOKEN"])},
repo["master_protection"] = protection
with open('repos_with_master_protection_info.json', 'w') as fp:
json.dump(repos, fp, indent=2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment