improved and working prototype of pullrequest.py