Skip to content

Instantly share code, notes, and snippets.

View tvansteenburgh's full-sized avatar

Tim Van Steenburgh tvansteenburgh

  • Stacklet.io
  • Gainesville, FL
View GitHub Profile
@tvansteenburgh
tvansteenburgh / protect-main-branches.py
Created January 13, 2022 20:04
Disable force pushing to main branches of Github repos
#!/usr/bin/env python3
import datetime
import os
import sys
from github import Github, GithubException
GITHUB_ACCESS_TOKEN = os.environ.get('GITHUB_ACCESS_TOKEN')
if not GITHUB_ACCESS_TOKEN: