Class PendingApprovalAction.ApprovalScanListener
java.lang.Object
io.jenkins.plugins.github_pr_approval.PendingApprovalAction.ApprovalScanListener
- All Implemented Interfaces:
ExtensionPoint, ExecutorListener
- Enclosing class:
PendingApprovalAction
@Extension
public static class PendingApprovalAction.ApprovalScanListener
extends Object
implements ExecutorListener
Settles every pull request once a branch scan has finished.
Nothing else tells us a scan happened: no item listener fires for a re-index, and branch indexing writes down the revision it has just seen only after it has scheduled the build. So a scan is the one moment we most need to look again, and the only safe place to look is once it is over. A pull request that has moved past the commit it was approved for goes back to pending here — and because disabling a job also cancels whatever it has queued, the build the scan just scheduled is cancelled with it, as long as it has not started yet.
Branch indexing runs as a queue task on the multibranch project itself, which is why this
hangs off ExecutorListener rather than anything branch-related.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidtaskCompleted(Executor executor, Queue.Task task, long durationMS) voidtaskCompletedWithProblems(Executor executor, Queue.Task task, long durationMS, Throwable problems) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ExecutorListener
taskAccepted, taskStarted
-
Constructor Details
-
ApprovalScanListener
public ApprovalScanListener()
-
-
Method Details
-
taskCompleted
- Specified by:
taskCompletedin interfaceExecutorListener
-
taskCompletedWithProblems
public void taskCompletedWithProblems(Executor executor, Queue.Task task, long durationMS, Throwable problems) - Specified by:
taskCompletedWithProblemsin interfaceExecutorListener
-