I have an upstream freestyle job and a downstream pipeline job.
The freestyle job is triggered via a gitHub webhook to run whenever code is pushed to gitHub branch.
The freestyle job should capture the branch name and pass to the pipeline job and should trigger the build for that particular branch.
How to pass the branch name to the pipeline job dynamically?