Refactor checking for pull request approval to its own method.