How to pull the Build change list information via pipeline scripting?

There is currentBuild.changeSets, but see [JENKINS-68010] Changes are empty after a force push - Jenkins Jira

Also it appears it’s @NonCPS.

I never really understood the changeSets thing. Is it only the changes in the current build? but compared to what? The last successful build or compared from the current branch to the master branch :thinking: