Class BlamerFactory
java.lang.Object
io.jenkins.plugins.forensics.blame.BlamerFactory
- All Implemented Interfaces:
ExtensionPoint
- Author:
- Ullrich Hafner
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateBlamer
(SCM scm, Run<?, ?> run, FilePath workspace, TaskListener listener, edu.hm.hafner.util.FilteredLog logger) Returns a blamer for the specifiedSCM
.static Blamer
findBlamer
(Run<?, ?> run, Collection<FilePath> scmDirectories, TaskListener listener, edu.hm.hafner.util.FilteredLog logger) Returns a blamer for the specifiedbuild
.static Blamer
findBlamer
(String scm, Run<?, ?> run, FilePath workTree, TaskListener listener, edu.hm.hafner.util.FilteredLog logger) Returns a blamer for the specifiedrepository
.
-
Constructor Details
-
BlamerFactory
public BlamerFactory()
-
-
Method Details
-
createBlamer
public abstract Optional<Blamer> createBlamer(SCM scm, Run<?, ?> run, FilePath workspace, TaskListener listener, edu.hm.hafner.util.FilteredLog logger) Returns a blamer for the specifiedSCM
. -
findBlamer
public static Blamer findBlamer(Run<?, ?> run, Collection<FilePath> scmDirectories, TaskListener listener, edu.hm.hafner.util.FilteredLog logger) Returns a blamer for the specifiedbuild
.- Parameters:
run
- the current buildscmDirectories
- paths to search for the SCM repositorylistener
- a task listenerlogger
- a logger to report error messages- Returns:
- a blamer for the SCM of the specified build or a
Blamer.NullBlamer
if the SCM is not supported
-
findBlamer
public static Blamer findBlamer(String scm, Run<?, ?> run, FilePath workTree, TaskListener listener, edu.hm.hafner.util.FilteredLog logger) Returns a blamer for the specifiedrepository
.- Parameters:
scm
- the key of the SCM repository (substring that must be part of the SCM key)run
- the current buildworkTree
- the working tree of the repositorylistener
- a task listenerlogger
- a logger to report error messages- Returns:
- a blamer for the SCM of the specified build or a
Blamer.NullBlamer
if the SCM is not supported
-