How do I configure Jenkins to trigger on a pull request based on the Git branch's name?
Using a multi-branch pipeline you have several different ways of filtering branches, take for instance a regular expression for "foo". In order to use this job type, you must create a Jenkinsfile in your repo with build instructions using the scripted or declarative syntax. The term pull request is typically synonymous with services like Github and Bitbucket. 

  

You can also filter within the pipeline itself using declarative syntax:

when {changeRequest branch: "foo.*", comparator: 'REGEXP' }


And also scripted syntax:

if (env.BRANCH_NAME ==~ /foo.*/){  
    ...
}