Skip to content

Commit 611faa0

Browse files
author
Vikas Mulaje
committed
added github.py module which will extract all the title fo current opend pr's
1 parent 3defd6b commit 611faa0

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

plugins/github.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import requests
2+
import json
3+
list_of_pull_requests=[]
4+
def get_pull_requests(username,repository):
5+
r=requests.get("https://api.github.com/repos/"+username+"/"+repository+"/pulls")
6+
js=json.loads(r.content)
7+
for i in range(0,len(js)):
8+
if 'title' in js[i].keys():
9+
list_of_pull_requests.append(js[i]['title'])
10+
return list_of_pull_requests
11+
12+
13+
#print get_pull_requests(username,repository)

0 commit comments

Comments
 (0)