Class PendingApprovalAction.ApprovalItemListener

java.lang.Object
hudson.model.listeners.ItemListener
io.jenkins.plugins.github_pr_approval.PendingApprovalAction.ApprovalItemListener
All Implemented Interfaces:
ExtensionPoint
Enclosing class:
PendingApprovalAction

@Extension public static class PendingApprovalAction.ApprovalItemListener extends ItemListener
Puts a newly discovered fork pull request on hold, and catches the jobs that were already there when the trust policy got switched on.
  • Constructor Details

    • ApprovalItemListener

      public ApprovalItemListener()
  • Method Details

    • onCreated

      public void onCreated(Item item)
      Overrides:
      onCreated in class ItemListener
    • onLoaded

      public void onLoaded()
      Nothing carries the disabled flag across a restart on its own — branch indexing rewrites the branch job's config as it goes — so once everything is loaded, put every held pull request back to what its approval record says. Only reads records that already exist, so this never calls GitHub while Jenkins is still starting.
      Overrides:
      onLoaded in class ItemListener
    • onUpdated

      public void onUpdated(Item item)
      Overrides:
      onUpdated in class ItemListener