All Downloads are FREE. Search and download functionalities are using the official Maven repository.

hudson.plugins.emailext.plugins.content.ChangesSinceLastUnstableBuildContent Maven / Gradle / Ivy

The newest version!
package hudson.plugins.emailext.plugins.content;

import hudson.model.AbstractBuild;
import hudson.model.AbstractProject;
import hudson.model.Result;

public class ChangesSinceLastUnstableBuildContent
    extends AbstractChangesSinceContent
{
    private static final String TOKEN = "CHANGES_SINCE_LAST_UNSTABLE";

    private static final String FORMAT_DEFAULT_VALUE = "Changes for Build #%n\\n%c\\n";

    public String getToken()
    {
        return TOKEN;
    }

    @Override
    public String getDefaultFormatValue()
    {
        return FORMAT_DEFAULT_VALUE;
    }

    @Override
    public String getShortHelpDescription()
    {
        return "Displays the changes since the last unstable or successful build.";
    }

    @Override
    public 

, B extends AbstractBuild> AbstractBuild getFirstIncludedBuild( AbstractBuild build ) { AbstractBuild firstIncludedBuild = build; B prev = firstIncludedBuild.getPreviousBuild(); while (prev != null && prev.getResult().isWorseThan(Result.UNSTABLE)) { firstIncludedBuild = prev; prev = firstIncludedBuild.getPreviousBuild(); } return firstIncludedBuild; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy