Skip to content

Commit e5707b7

Browse files
committed
Removing TrustworthyBuild.byCause; impls may want to add logging anyway
1 parent 013950c commit e5707b7

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/main/java/jenkins/scm/api/TrustworthyBuild.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
import edu.umd.cs.findbugs.annotations.NonNull;
2828
import hudson.ExtensionPoint;
29-
import hudson.model.Cause;
3029
import hudson.model.Run;
3130
import hudson.model.TaskListener;
3231
import 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
}

0 commit comments

Comments
 (0)