In the Jenkins API is there a way to find the git commit of the last build?

Viewed 4592

I would like to write a script to automate the feature branch creation for hot-fixes. In order to do that I need to figure out how to see what was the last commit in the current build.

Is there a way to get the last commit from the Jenkins API?

git checkout -b hotfix <commit>
1 Answers
Related