You've already forked PythonLib
mirror of
https://github.com/lifebottle/PythonLib.git
synced 2026-02-13 15:25:50 -08:00
Changing to a List and finishing get_pull_requests_message
This commit is contained in:
@@ -44,13 +44,24 @@ def get_pull_requests(org, repo_name):
|
||||
#Taking Top 5 PR
|
||||
top5 = json_res[0:5]
|
||||
|
||||
top5_infos = pd.DataFrame([ [ele['created_at'], ele['title'], ele['state'], ele['user']['login'], ele['url']] for ele in top5], columns = ['Created', 'Title', 'Status', 'User', 'Url'])
|
||||
|
||||
return top5
|
||||
|
||||
def get_pull_requests_message(org, repo_name):
|
||||
|
||||
#Get Datas
|
||||
get_pull_requests(org, repo_name)
|
||||
top5_prs = get_pull_requests(org, repo_name)
|
||||
|
||||
message ='Here are the PRs recently : '
|
||||
|
||||
for pr in top5_prs:
|
||||
|
||||
message = message + "\n"
|
||||
message += '{} - {} by {}'.format(pr['created_at'], pr['title'], pr['user']['login'])
|
||||
|
||||
return message
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user