Class DefaultPushGHEventSubscriber
java.lang.Object
org.jenkinsci.plugins.github.extension.GHEventsSubscriber
org.jenkinsci.plugins.github.webhook.subscriber.DefaultPushGHEventSubscriber
- All Implemented Interfaces:
ExtensionPoint
By default this plugin interested in push events only when job uses
GitHubPushTrigger- Since:
- 1.12.0
- Author:
- lanwen (Merkushev Kirill)
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Set<org.kohsuke.github.GHEvent>events()Should be not null.protected booleanisApplicable(Item project) This subscriber is applicable only for job with GHPush triggerprotected voidonEvent(GHSubscriberEvent event) CallsGitHubPushTriggerin all projects to handle this hookMethods inherited from class org.jenkinsci.plugins.github.extension.GHEventsSubscriber
all, extractEvents, isApplicable, isApplicableFor, isApplicableFor, isInterestedIn, onEvent, processEvent, processEvent
-
Constructor Details
-
DefaultPushGHEventSubscriber
public DefaultPushGHEventSubscriber()
-
-
Method Details
-
isApplicable
This subscriber is applicable only for job with GHPush trigger- Specified by:
isApplicablein classGHEventsSubscriber- Parameters:
project- to check for trigger- Returns:
- true if project has
GitHubPushTrigger
-
events
Description copied from class:GHEventsSubscriberShould be not null. Should return only events which this extension can parse inGHEventsSubscriber.onEvent(GHEvent, String)Don't call it directly, useGHEventsSubscriber.extractEvents()orGHEventsSubscriber.isInterestedIn(GHEvent)static functions- Specified by:
eventsin classGHEventsSubscriber- Returns:
- set with only push event
-
onEvent
CallsGitHubPushTriggerin all projects to handle this hook- Overrides:
onEventin classGHEventsSubscriber- Parameters:
event- only PUSH event
-