Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-55993

Arrange GitHub email notifications support as an alternative transport for webhooks

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • github-plugin
    • None

      While researching for JENKINS-55949, looking for ways to quickly react to repository changes while webhooks initiated from the Internet into a private Jenkins instance are not an option, I found that Github deprecated the older Services in favor of webhooks, but there is a new way of email notifications for individuals and organizations, which include much data about repository activity (the list does not explicitly mention creation of pull requests though, but there are messages for PR comments and addition of PR commits which may be the same thing effectively... even if not, at least fast reaction to new commits on branches are already a good thing):

      People say the new technology works for them

      So the idea with this RFE is that since there are Github e-mail notifications about repository events, they might be used with a script (or eventually plugin) that would connect to a specified mailbox (corporate, gmail, whatever) and maybe IMAP folder if the server can sort the mails, find notification mails there, and trigger webhook activity (generate a JSON payload from the email contents and POST it into the existing github webhook handler on Jenkins master with curl; or do the equivalent Java call directly if done as a plugin). Such script should also move the processed emails into Trash folder, so the mail server eventually purges them, while they are available for review and debug. For best responsiveness, IMAP IDLE or Push-IMAP might be used as the mail client transport, so the script would be notified of new e-mails as soon as they appear in the mailbox, minimizing the lag. Otherwise, regular polling of the mailbox would work as an a bit worse but possible solution.

      PS : Given that this currently seems like a new development that is not part of an existing plugin, there were some problems choosing what JIRA component to classify this into :\

            lanwen Kirill Merkushev
            jimklimov Jim Klimov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: