File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
src/main/java/jenkins/scm/api Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change 2626
2727import edu .umd .cs .findbugs .annotations .NonNull ;
2828import hudson .ExtensionPoint ;
29- import hudson .model .Cause ;
3029import hudson .model .Run ;
3130import hudson .model .TaskListener ;
3231import hudson .triggers .SCMTrigger ;
@@ -43,21 +42,14 @@ public interface TrustworthyBuild extends ExtensionPoint {
4342 /**
4443 * Should this build be trusted to load sensitive source files?
4544 * If any implementation returns true then it is trusted.
46- */
47- boolean shouldBeTrusted (@ NonNull Run <?, ?> build , @ NonNull TaskListener listener );
48-
49- /**
50- * Convenience for the common case that a particular trigger cause indicates trust.
51- * Examples of causes which should <em>not</em> be registered include:
45+ * Examples of build-triggering causes which should <em>not</em> be trusted include:
5246 * <ul>
5347 * <li>{@link TimerTrigger.TimerTriggerCause}
5448 * <li>{@link SCMTrigger.SCMTriggerCause}
5549 * <li>{@code BranchIndexingCause}
5650 * <li>{@code BranchEventCause}
5751 * </ul>
5852 */
59- static TrustworthyBuild byCause (Class <? extends Cause > causeType ) {
60- return (build , listener ) -> build .getCause (causeType ) != null ;
61- }
53+ boolean shouldBeTrusted (@ NonNull Run <?, ?> build , @ NonNull TaskListener listener );
6254
6355}
You can’t perform that action at this time.
0 commit comments