Merge branch 'master' of github.com:mozilla/olympia

This commit is contained in:
verbatim updates user 2015-10-07 14:26:59 +00:00
Родитель 48afb3e29f c938eff111
Коммит 0c4659b4e8
1 изменённых файлов: 0 добавлений и 36 удалений

Просмотреть файл

@ -1,36 +0,0 @@
import json
import requests
import os
import time
GH_URL = 'https://api.github.com/repos/mozilla/zamboni/commits/master'
DEV_URL = 'https://marketplace-dev.allizom.org/media/git-rev.txt'
messaged = False
def alert(msg):
os.system('growlnotify --message "%s"' % msg)
alert('Watching -dev')
while True:
r = requests.get(GH_URL)
obj = json.loads(r.content)
git_sha = obj['sha'][:7]
r = requests.get(DEV_URL)
dev_sha = r.content.strip()
if git_sha == dev_sha:
msg = '-dev is up to date\n%s - %s' % (obj['commit']['author']['name'],
obj['commit']['message'])
alert(msg)
break
else:
if not messaged:
alert('-dev is behind master\n%s...%s' % (git_sha, dev_sha))
messaged = True
time.sleep(15)