-
Notifications
You must be signed in to change notification settings - Fork 23
/
get_legacy_search.py
32 lines (26 loc) · 1005 Bytes
/
get_legacy_search.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
from github import Github
from github_token import GITHUB_TOKEN, user, password
g1 = Github(GITHUB_TOKEN)
g2 = Github(user, password)
repo_keyword = "coala"
#Find repo by legacy search according to keyword
legacy_search_repos = g2.legacy_search_repos(repo_keyword)
for legacy_search_repo in legacy_search_repos:
print(legacy_search_repo)
#Find users by legacy search
user_keyword = "sks444"
legacy_search_users = g2.legacy_search_users(user_keyword)
for legacy_search_user in legacy_search_users:
print(legacy_search_user)
#Find users by email using legacy search
email = "[email protected]"
legacy_search_user_by_email = g2.legacy_search_user_by_email(email)
print (legacy_search_user_by_email)
#Find issues by legacy search
keyword = "import data model"
org = "coala"
organization = g2.get_organization(org)
repo = organization.get_repo("community")
legacy_search_issues = repo.legacy_search_issues(keyword)
for legacy_search_issue in legacy_search_issues:
print(legacy_search_issue)