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 boolean
isApplicable
(Item project) This subscriber is applicable only for job with GHPush triggerprotected void
onEvent
(GHSubscriberEvent event) CallsGitHubPushTrigger
in 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:
isApplicable
in classGHEventsSubscriber
- Parameters:
project
- to check for trigger- Returns:
- true if project has
GitHubPushTrigger
-
events
Description copied from class:GHEventsSubscriber
Should 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:
events
in classGHEventsSubscriber
- Returns:
- set with only push event
-
onEvent
CallsGitHubPushTrigger
in all projects to handle this hook- Overrides:
onEvent
in classGHEventsSubscriber
- Parameters:
event
- only PUSH event
-