jenkinsci / jenkinsci/git-plugin
[JENKINS-26317] CommitHookCause should extend SCMTriggerCause
- Dominant language
- Java
- Stars
- 694
- Forks
- 1.1k
- Avg merge
- 1h 29m
- Merged PRs (30d)
- 3
Description
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)
---
Originally reported by bbaetz, imported from: CommitHookCause should extend SCMTriggerCause
Raw content of original issue
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)
Contributor guide
Assessment
This issue has not been assessed yet.