Created
August 20, 2015 11:53
-
-
Save akkomar/ea26cd9cefbb1d1c4c4b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys, os | |
input = sys.stdin.read() | |
oldrev, newrev, refname = input.rstrip().split(" ") | |
SUPER_USER_KEY_ID = 'key-ID' | |
user_key_id = os.environ['GL_ID'] | |
if (refname == 'refs/heads/PROTECTED_BRANCH_ID' and user_key_id != SUPER_USER_KEY_ID): | |
print "Only SUPER USER can push to PROTECTED_BRANCH_ID branch!" | |
sys.exit(1) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment