jenkinsci / jenkinsci/github-branch-source-plugin

[JENKINS-67998] GitHub: Provide CHANGE_AUTHOR_EMAIL

Open
#1,388 3 comments 0 reactions 0 assignees View on GitHub
component:github-branch-source-plugin enhancement imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
217
Forks
398
Avg merge
30m
Merged PRs (30d)
1

Description

As already written in JENKINS-39838 there is currently no CHANGE_AUTHOR_EMAIL provided by the github-branch-source-Plugin.

This is likely the case because the payload of a GitHub webhook contains only the GITHUB_AUTHOR/GITHUB_AUTHOR_DISPLAY_NAME.

Backstory: We recently switched from Bitbucket to Github and also had to change the plugins in our Jenkins. However we require CHANGE_AUTHOR_EMAIL so that an E-Mail is sent to the corresponding user when the build fails. This is only required because there are currently other bugs that prevent the emailext Plugin from working correctly like e.g. JENKINS-24638. CHANGE_AUTHOR_EMAIL was a good workaround for this problem when we used bitbucket.

I think resolving the E-Mail can be done by querying the GitHub-API:

e.g. https://api.github.com/repos///commits/ or https://api.github.com/repos///commits?author=

This returns the corresponding GitHub user and the E-Mail which was used for committing.

---
Originally reported by ab_xdev, imported from: GitHub: Provide CHANGE_AUTHOR_EMAIL


  • status: Open
  • priority: Minor
  • component(s): github-branch-source-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 2025-12-02

Raw content of original issue

As already written in JENKINS-39838 there is currently no CHANGE_AUTHOR_EMAIL provided by the github-branch-source-Plugin.

This is likely the case because the payload of a GitHub webhook contains only the GITHUB_AUTHOR/GITHUB_AUTHOR_DISPLAY_NAME.

Backstory: We recently switched from Bitbucket to Github and also had to change the plugins in our Jenkins. However we require CHANGE_AUTHOR_EMAIL so that an E-Mail is sent to the corresponding user when the build fails. This is only required because there are currently other bugs that prevent the emailext Plugin from working correctly like e.g. JENKINS-24638. CHANGE_AUTHOR_EMAIL was a good workaround for this problem when we used bitbucket.

I think resolving the E-Mail can be done by querying the GitHub-API:
e.g. https://api.github.com/repos/<OWNER>/<REPO>/commits/<REF> or https://api.github.com/repos/<OWNER>/<REPO>/commits?author=<LOGIN>
This returns the corresponding GitHub user and the E-Mail which was used for committing.

environment

```
Jenkins 2.319.3

github-branch-source 2.11.4
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.