title: Approve Jenkins Pipeline input step with Bitbucket webhook
body: <p>I have a pipeline that waits for a merge of a branch to master. It contains an input step: </p>
  
  <pre><code>input message: 'Merge complete?', id: 'merge', ok: 'Done'
  </code></pre>
  
  <p>Instead of approving it manually I'd like it to be automatically approved by Bitbucket using post-merge webhook. I know that it's possible to approve it using the Jenkins REST API with the following url: 
  <a href="https://JENKINS_HOST/JOB_NAME/BUILD_NUMBER/input/Merge/proceedEmpty" rel="nofollow noreferrer">https://JENKINS_HOST/JOB_NAME/BUILD_NUMBER/input/Merge/proceedEmpty</a><br>
  Build number changes on every subsequent build. Is it possible to somehow pass the $BUILD_NUMBER variable to Bitbucket, so it could dynamically update its endpoint URL field in post-merge hook configuration? </p>