-
Notifications
You must be signed in to change notification settings - Fork 0
/
githubAPI.py
56 lines (48 loc) · 1.49 KB
/
githubAPI.py
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
from github import Github
import getpass
#g = Github("user", "password")
username = raw_input("Github Username:")
pw = getpass.getpass()
g = Github(username,pw)
f = open('data.tsv','w')
x = 0
for repo in g.get_user().get_repos():
print repo.name + " "
numberOfCommits = 0
for commit in repo.get_commits():
#print commit
numberOfCommits += 1
print "Number of Commits: " + repr(numberOfCommits)
for collaborators in repo.get_collaborators():
print collaborators
for languages in repo.get_languages():
print languages
for branch in repo.get_branches():
print branch
print ""
print repo.get_stats_contributors()
#email = raw_input("Email:")
#print g.legacy_search_user_by_email(email)
#print g.get_last_api_status_message()
#print "letter frequency"
#f.write("letter frequency\n")
#for repo in g.get_user().get_repos():
#print repo.name
# numberOfCommits = 0
# for commit in repo.get_commits():
#print commit
# numberOfCommits += 1
#print "Number of Commits: " + repr(numberOfCommits)
# print repo.name + " " + repr(numberOfCommits)
# f.write(repo.name + " " + repr(numberOfCommits) + "\n")
# for collaborators in repo.get_collaborators():
#print collaborators
# x = 1
# for languages in repo.get_languages():
#print languages
# x = 1
# for branch in repo.get_branches():
#print branch
#print ""
# x = 1
#print repo.get_stats_contributors()