-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
executable file
·58 lines (42 loc) · 1.38 KB
/
test.py
File metadata and controls
executable file
·58 lines (42 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/Library/Frameworks/Python.framework/Versions/2.7/bin/python
from pygithub3 import Github
import pygithub3
import requests
import sys
import traceback
gh = Github(login='githubdata', password='Password123')
sha = 'b15ce4a006756a0b6cacfb9593d88c9a7dfd8eb0'
user = 'rails'
repo = 'rails'
commit = gh.repos.commits.get(sha,user=user,repo=repo)
print commit.stats.total
print commit.stats.additions
parents=[]
for i in commit.parents:
parents.append(i.sha)
print parents
'''
for file in commit.files:
print file.filename
print file.status
print file.additions
print file.deletions
print file.changes
'''
#octocat = gh.users.get() # Auth required
#copitux = gh.users.get('copitux')
# copitux = <User (copitux)>
#octocat_followers = gh.users.followers.list().all()
#githubdata = gh.users.followers.list_following('githubdata')
#copitux_followers = gh.users.followers.list('maccman')
#print len(copitux_followers.all())
#copitux_followers = gh.users.followers.list('copitux').all()
#auth = dict(login='githubdata', password='Password123')
#gh = Github(**auth)
#octocat_repo_issues = gh.issues.list_by_repo('octocat','Hello-World')
#members=gh.orgs.members.list('Railsware')
#orgs = gh.orgs.list('iurevych')
#teams = gh.orgs.teams.list('EventStore')
#stars = gh.repos.watchers.list('adamsinger','apple_push_notification')
#stars = gh.repos.watchers.list_repos('adamsinger')
#print len(stars.all())