use of hudson.model.Cause.RemoteCause in project hudson-2.x by hudson.
the class AbstractProject method getBuildCause.
/**
* Computes the build cause, using RemoteCause or UserCause as appropriate.
*/
/*package*/
CauseAction getBuildCause(StaplerRequest req) {
Cause cause;
if (authToken != null && authToken.getToken() != null && req.getParameter("token") != null) {
// Optional additional cause text when starting via token
String causeText = req.getParameter("cause");
cause = new RemoteCause(req.getRemoteAddr(), causeText);
} else {
cause = new UserCause();
}
return new CauseAction(cause);
}
Aggregations