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 allChangeLogSet
s currently associated with this item.Set<String>
getCulpritIds()
Gets the ids for allUser
s 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 boolean
hasParticipant(User user)
Returns true if this user has made a commit to this build.boolean
shouldCalculateCulprits()
Determines whether culprits should be recalcuated or the existinggetCulpritIds()
should be used instead.
-
-
-
Method Detail
-
getChangeSets
@NonNull List<ChangeLogSet<? extends ChangeLogSet.Entry>> getChangeSets()
Gets allChangeLogSet
s currently associated with this item.- Returns:
- A possibly empty list of
ChangeLogSet
s.
-
getCulpritIds
@CheckForNull Set<String> getCulpritIds()
Gets the ids for allUser
s 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
RunWithSCM
instance 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
User
s 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.
-
-