Pullrequest api

Basic functionality for pullrequest support