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

CommitHookCause should extend SCMTriggerCause

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • git-plugin
    • None

      When a commit hook triggers a Jenkins build using the git-plugin's REST API, the cause of this is a CommitHookCause. However, this Cause doesn't extend SCMTriggerCause.

      This means that plugins which have an option to do things like ignore SCM-triggered changes (eg the sonar plugin) don't treat these triggers correctly.

      I'm happy to submit a pull request, but I'm not sure if there are any subtle/unwanted side effects from this. I saw a similar request (JENKINS-15823) for the gerrit jenkins plugin.

      (Note that some plugins will still not detect this - the sonar plugin uses "SCMTrigger.SCMTriggerCause.class.isInstance(cause)" and so is fine with subclasses, but eg the run condition plugin does a string comparison on the class name, so will still not see this properly)

          [JENKINS-26317] CommitHookCause should extend SCMTriggerCause

          There are no comments yet on this issue.

            Unassigned Unassigned
            bbaetz Bradley Baetz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: