-
Improvement
-
Resolution: Unresolved
-
Minor
-
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)