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

DefaultPushGHEventSubscriber does not pass important details of the webhook to GitHubWebHook.Listener

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • github-plugin
    • None

      The DefaultPushGHEventSubscriber provides an extension point for "other plugins [that] may be interested in listening for these updates" (GitHubWebHook.Listener). However, the only information those other plugins can receive is the name of the pusher and the repository URL.

      It'd be useful to also give the GHEvent, the string payload, or both to the listener, so that the extension can make useful decisions about what to do on the push event. As it is, a listener can know a push happened on a repo, but not what was pushed.

      This restricts the ability of the listeners to perform useful tasks such as only updating a single branch (e.g. https://github.com/jenkinsci/github-branch-source-plugin/blob/master@%7B2016-09-02%7D/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubWebhookListenerImpl.java#L49) - seems to be the root cause behind major missing functionality in github-branch-source, for instance

            lanwen Kirill Merkushev
            dominics Dominic Scheirlinck
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: