title: Generic webhook Trigger plugin to build based on files and specific branch
body: <p>I have generic webhook trigger plugin in Jenkins. I have to build based on files changed on a specific branch on the repo. Let me know.
  I use Github and jenkins.</p>
  
  <pre><code>variable: changed_files Expression: $.commits[*]. 
  ['modified','added','removed'][*]
  variable: ref Expression: $.ref
  </code></pre>
  
  <p>In Option Filter
  I have these</p>
  
  <pre><code>text: $ref $changed_files
  Expression: (^refs/heads/develop)\s"local/test/[^"]+?"
  </code></pre>
  
  <p><strong>result:</strong> Build not getting triggered though Json has proper values.</p>
  
  <p>In Option filter 
  I have these</p>
  
  <pre><code>text: $changed_files
  Expression: "local/test/[^"]+?"
  </code></pre>
  
  <p><strong>result:</strong> build is getting triggered irrespective of the branch.</p>
  
  <p>Please let me know how to configure  Option filter expressions.
  Let me know how i can checkout only the branch on which commit has happened in the repo. I have using pipeline jobs.</p>