It has been a while since any action on this page, mostly likely because it is a closed issue, but I am seeing the same problem as Amir Barkal was seeing above above. The listed CHANGE_* vars are set, but not CHANGE_AUTHOR_EMAIL.
Environment:
Using a multibranch job with the Branch Sources plugin using a github app for authentication.
Jenkins 2.235.1
GitHub API Plugin 1.114.3
GitHub Branch Source Plugin 2.8.2
GitHub plugin 1.30.0
I am happy to open a separate ticket for this issue if someone suggests that. My main reason for commenting here is to let others know that I am also seeing this problem, as it seems like if it is a valid problem, then it ought to affect many people.
FWIW for now, I am planning on working around the issue by simply examining the email address belonging to the author of the most recent git revision on the PR branch. However don't be mislead... I don't believe this solution is equivalent to what we should expect from CHANGE_AUTHOR_EMAIL, as I believe that email address ought to be whatever email address the PR author has set up in Github, which is not necessarily the same as the author of the most recent commit on the PR branch.
I will also note that I am migrating from Bitbucket to Github, and the Bitbucket plugin does provide CHANGE_AUTHOR_EMAIL, so we should aim for feature parity here also.
Could you please also add following variables:
Source_branch
Repository_owner (organization)
repository_name
sha (commit_sha)
the last one is very important