提交 f00efb4b 编写于 作者: K kohsuke

added a convenience method.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@36212 71c3de6d-444a-0410-be80-ed276b4c234a
上级 a1cc3b4f
......@@ -689,7 +689,18 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
r=r.previousBuild;
return r;
}
/**
* Returns the last successful build before this build.
* @since 1.383
*/
public RunT getPreviousSuccessfulBuild() {
RunT r=previousBuild;
while( r!=null && r.getResult()!=Result.SUCCESS )
r=r.previousBuild;
return r;
}
/**
* Returns the last 'numberOfBuilds' builds with a build result >= 'threshold'.
*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册