Search in sources :

Example 1 with RemoteCause

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);
}
Also used : UserCause(hudson.model.Cause.UserCause) UserCause(hudson.model.Cause.UserCause) RemoteCause(hudson.model.Cause.RemoteCause) LegacyCodeCause(hudson.model.Cause.LegacyCodeCause) RemoteCause(hudson.model.Cause.RemoteCause)

Aggregations

LegacyCodeCause (hudson.model.Cause.LegacyCodeCause)1 RemoteCause (hudson.model.Cause.RemoteCause)1 UserCause (hudson.model.Cause.UserCause)1