Package jenkins.scm
Interface RunWithSCM<JobT extends Job<JobT,RunT>,RunT extends Run<JobT,RunT> & RunWithSCM<JobT,RunT>>
-
- All Known Implementing Classes:
AbstractBuild,Build,FreeStyleBuild
public interface RunWithSCM<JobT extends Job<JobT,RunT>,RunT extends Run<JobT,RunT> & RunWithSCM<JobT,RunT>>- Since:
- 2.60
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Set<User>calculateCulprits()Method used for actually calculating the culprits from scratch.List<ChangeLogSet<? extends ChangeLogSet.Entry>>getChangeSets()Gets allChangeLogSets currently associated with this item.Set<String>getCulpritIds()Gets the ids for allUsers included ingetChangeSets()for this item.default Set<User>getCulprits()List of users who committed a change since the last non-broken build till now.default booleanhasParticipant(User user)Returns true if this user has made a commit to this build.booleanshouldCalculateCulprits()Determines whether culprits should be recalcuated or the existinggetCulpritIds()should be used instead.
-
-
-
Method Detail
-
getChangeSets
@NonNull List<ChangeLogSet<? extends ChangeLogSet.Entry>> getChangeSets()
Gets allChangeLogSets currently associated with this item.- Returns:
- A possibly empty list of
ChangeLogSets.
-
getCulpritIds
@CheckForNull Set<String> getCulpritIds()
Gets the ids for allUsers included ingetChangeSets()for this item.- Returns:
- A set of user IDs, or null if this was the first time the method was called or the build is still running
for a
RunWithSCMinstance with no culprits.
-
shouldCalculateCulprits
boolean shouldCalculateCulprits()
Determines whether culprits should be recalcuated or the existinggetCulpritIds()should be used instead.- Returns:
- True if culprits should be recalcuated, false otherwise.
-
getCulprits
@Exported @NonNull default Set<User> getCulprits()
List of users who committed a change since the last non-broken build till now.This list at least always include people who made changes in this build, but if the previous build was a failure it also includes the culprit list from there.
Missing
Users will be created on-demand.- Returns:
- can be empty but never null.
-
calculateCulprits
@NonNull default Set<User> calculateCulprits()
Method used for actually calculating the culprits from scratch. Called bygetCulprits()and overrides ofgetCulprits(). Does not persist culprits information.
-
hasParticipant
default boolean hasParticipant(User user)
Returns true if this user has made a commit to this build.
-
-