Factored out pull request database into a class