Class CommitStatisticsBuildAction
java.lang.Object
hudson.model.InvisibleAction
io.jenkins.plugins.forensics.miner.CommitStatisticsBuildAction
- All Implemented Interfaces:
Action,ModelObject,Serializable,RunAction2,SimpleBuildStep.LastBuildAction
public class CommitStatisticsBuildAction
extends InvisibleAction
implements SimpleBuildStep.LastBuildAction, RunAction2, Serializable
Controls the life cycle of the commit statistics in a job. This action persists the results of a build and displays a
summary on the build page. The actual visualization of the results is defined in the matching
summary.jelly
file.- Author:
- Ullrich Hafner
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCommitStatisticsBuildAction(Run<?, ?> owner, String scmKey, CommitStatistics commitStatistics) Creates a new instance ofCommitStatisticsBuildAction. -
Method Summary
Modifier and TypeMethodDescriptionRun<?,?> getOwner()Collection<? extends Action>Returns the reference build action if present.Returns a link that can be used in Jelly views to navigate to the reference build.booleanReturns whether the statistics are based on a reference build or on the previous build.voidonAttached(Run<?, ?> run) voidtoString()Methods inherited from class hudson.model.InvisibleAction
getDisplayName, getIconFileName, getUrlNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface hudson.model.Action
getDisplayName, getIconFileName, getUrlName
-
Constructor Details
-
CommitStatisticsBuildAction
public CommitStatisticsBuildAction(Run<?, ?> owner, String scmKey, CommitStatistics commitStatistics) Creates a new instance ofCommitStatisticsBuildAction.- Parameters:
owner- the associated build that created the statisticsscmKey- key of the repositorycommitStatistics- the statistics to persist with this action
-
-
Method Details
-
getOwner
-
getScmKey
-
getCommitStatistics
-
hasReferenceBuild
public boolean hasReferenceBuild()Returns whether the statistics are based on a reference build or on the previous build.- Returns:
trueif there is a reference build defined,falseotherwise
-
getReferenceBuild
Returns the reference build action if present.- Returns:
- the action
-
getReferenceBuildLink
Returns a link that can be used in Jelly views to navigate to the reference build.- Returns:
- the link
-
toString
-
onAttached
- Specified by:
onAttachedin interfaceRunAction2
-
onLoad
- Specified by:
onLoadin interfaceRunAction2
-
getProjectActions
- Specified by:
getProjectActionsin interfaceSimpleBuildStep.LastBuildAction
-