Class PingGHEventSubscriber
- java.lang.Object
-
- org.jenkinsci.plugins.github.extension.GHEventsSubscriber
-
- org.jenkinsci.plugins.github.webhook.subscriber.PingGHEventSubscriber
-
- All Implemented Interfaces:
ExtensionPoint
@Extension public class PingGHEventSubscriber extends GHEventsSubscriber
Get ping events to log them- Since:
- 1.13.0
- Author:
- lanwen (Merkushev Kirill)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description PingGHEventSubscriber()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Set<org.kohsuke.github.GHEvent>
events()
Should be not null.protected boolean
isApplicable(Item project)
This subscriber is not applicable to any itemprotected void
onEvent(org.kohsuke.github.GHEvent event, String payload)
Logs repo on ping event-
Methods inherited from class org.jenkinsci.plugins.github.extension.GHEventsSubscriber
all, extractEvents, isApplicable, isApplicableFor, isApplicableFor, isInterestedIn, onEvent, processEvent, processEvent
-
-
-
-
Method Detail
-
isApplicable
protected boolean isApplicable(Item project)
This subscriber is not applicable to any item- Specified by:
isApplicable
in classGHEventsSubscriber
- Parameters:
project
- ignored- Returns:
- always false
-
events
protected Set<org.kohsuke.github.GHEvent> 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 ping event
-
onEvent
protected void onEvent(org.kohsuke.github.GHEvent event, String payload)
Logs repo on ping event- Overrides:
onEvent
in classGHEventsSubscriber
- Parameters:
event
- only PING eventpayload
- payload of gh-event. Never blank
-
-