Skip to content

Commit

Permalink
Add messages for whitelist contents
Browse files Browse the repository at this point in the history
  • Loading branch information
onyb committed Feb 5, 2016
1 parent 4527a06 commit b548ab5
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions check.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
import requests
from urlparse import urljoin

whitelist = [
'README.md',
'LICENSE.TXT',
'CONTRIBUTING.md',
'.gitignore',
'.travis.yml'
{
'file': 'README.md',
'msg': 'People really read this stuff'
},
{
'file': 'LICENSE.TXT',
'msg': 'Get an Open Source License buddy'
},
{
'file': 'CONTRIBUTING.md',
'msg': 'Dummy'
},
{
'file': '.travis.yml',
'msg': 'You should have CI stuff'
}, {
'file': '.gitignore',
'msg': 'You should have this as well'
},
]


Expand All @@ -20,8 +33,6 @@ def get_contents(self):
uri = "https://api.github.com/repos/%s/%s/contents" % (self.owner, self.repo)
resp = requests.get(uri)

print(uri)

if resp.status_code is not 200:
print(resp.status_code)
raise Exception
Expand All @@ -35,4 +46,4 @@ def check_file(self, file):
r = Repo("onyb", "cling")
r.get_contents()
for stuff in whitelist:
print(stuff, ':', r.check_file(stuff))
print(stuff['file'], ':', r.check_file(stuff), ' - ', stuff['msg'])

0 comments on commit b548ab5

Please sign in to comment.