title: Check if a pull request is up to date with the target branch
body: <p>Our project is using protected branches and requires the base branch of a PR to be up-to-date with the target branch in order to merge. We are also using Jenkins to build the unmerged head of the PR because the plugin we use will automatically rebuild all open PRs when the target branch changes, which can quickly clog up a pipeline. So, in the case that a PR is opened without being up-to-date with the target branch, we want to be able to stop the Jenkins pipeline right away and notify the committer that they need to merge first.</p>
  
  <p>So, using the GitHub API, I would like to be able to tell if a pull request is up-to-date with the target branch. The closest thing to this seems to be the "mergeable" attribute on a pull request, but that looks like it only indicates whether a safe auto-merge CAN be done, not whether the branch is already up-to-date.</p>
  
  <p>Is there a direct API json tag that can be looked at? If not, is there a simple way to check this manually with git commands?</p>