Changing to a List and finishing get_pull_requests_message

This commit is contained in:
Stewie
2022-05-21 23:20:56 -04:00
parent 710583bb95
commit b4cf41dc4c
6 changed files with 14 additions and 3 deletions

View File

@@ -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.