Initial commit, copying relevant parts from ghprb