Class CauseResolver
java.lang.Object
io.jenkins.plugins.interactiveinput.util.CauseResolver
Resolves a short, human-readable "who/what started this build" label for a
Run, used to
attribute interactive-input questions in the notification surfaces ("started by <user>").
Prefers a real Jenkins user id (Cause.UserIdCause); otherwise falls back to a stable
label for common non-interactive triggers (SCM, timer, upstream) or "system".
-
Field Summary
Fields -
Method Summary
-
Field Details
-
SYSTEM
Returned when a build has no attributable cause.- See Also:
-
-
Method Details
-
isRealUser
- Parameters:
startedBy- a value produced bystartedBy(Run)(a user id or a trigger label)- Returns:
trueif it denotes a real Jenkins user (i.e. a build a human started), rather than a non-interactive trigger label ornull/blank. Used to decide whether a build has an "owner" for user-scoped notifications and lock-to-starter.
-
startedBy
- Parameters:
run- the build to attribute (must not benull)- Returns:
- the triggering user id, or a trigger label (
scm,timer,upstream), orSYSTEM. Nevernullor empty.
-