diff --git a/RepoFunctions.py b/RepoFunctions.py index 3c0deea..2edb078 100644 --- a/RepoFunctions.py +++ b/RepoFunctions.py @@ -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 + + + \ No newline at end of file diff --git a/__pycache__/ApacheAutomate.cpython-38.pyc b/__pycache__/ApacheAutomate.cpython-38.pyc index b6b764c..7aa62bf 100644 Binary files a/__pycache__/ApacheAutomate.cpython-38.pyc and b/__pycache__/ApacheAutomate.cpython-38.pyc differ diff --git a/__pycache__/GoogleAPI.cpython-38.pyc b/__pycache__/GoogleAPI.cpython-38.pyc index 57082b4..98d1621 100644 Binary files a/__pycache__/GoogleAPI.cpython-38.pyc and b/__pycache__/GoogleAPI.cpython-38.pyc differ diff --git a/__pycache__/RepoFunctions.cpython-38.pyc b/__pycache__/RepoFunctions.cpython-38.pyc index 0a420d2..a24521e 100644 Binary files a/__pycache__/RepoFunctions.cpython-38.pyc and b/__pycache__/RepoFunctions.cpython-38.pyc differ diff --git a/__pycache__/ToolsTOR.cpython-38.pyc b/__pycache__/ToolsTOR.cpython-38.pyc index 01dc51b..24b84b4 100644 Binary files a/__pycache__/ToolsTOR.cpython-38.pyc and b/__pycache__/ToolsTOR.cpython-38.pyc differ diff --git a/__pycache__/ToolsTales.cpython-38.pyc b/__pycache__/ToolsTales.cpython-38.pyc index 0c9a196..b43e7fc 100644 Binary files a/__pycache__/ToolsTales.cpython-38.pyc and b/__pycache__/ToolsTales.cpython-38.pyc differ