Skip to content

Instantly share code, notes, and snippets.

@charlesreid1
Last active March 4, 2019 16:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save charlesreid1/5394ab4d0bee3b0e9f129df2c954ba21 to your computer and use it in GitHub Desktop.
Save charlesreid1/5394ab4d0bee3b0e9f129df2c954ba21 to your computer and use it in GitHub Desktop.
Centillion Dead Person Switch: If this script is run for more than 72 hours continuously, it will make the dcppc/centillion repository public.
#!/usr/bin/env python
import re, os
from github import Github
import time
'''
Centillion Dead Person Switch
If this script is run for
more than 72 hours continuously,
it will make the dcppc/centillion
repository public.
'''
def wait():
time.sleep(3600*72)
def main():
reponame = 'dcppc/centillion'
which_org, which_repo = re.split('/',reponame)
access_token = os.environ['GITHUB_TOKEN']
g = Github(access_token)
org = g.get_organization(which_org)
repo = org.get_repo(which_repo)
repo.edit(private=False)
if __name__=="__main__":
wait()
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment