projzone/webhook

0.2.0

Module overview

This module impelements a custom webhook for ProjZone.

The projzone/webhook module defines three kinds of services (BugDiscussionService, ImprovementDiscussionService, and/or FeatureRequestDiscussionService) that can be attached to the listener defined in the module.

The listener looks at the attached services and sends subscription requests on behalf of the user. For example, if only a BugDiscussionService is declared with a projzone/webhook listener, the subscription will be only for bug discussions.

Copy
import projzone/webhook;

configurable int port = ?;
configurable string orgName = ?;
configurable string projName = ?;
configurable string secret = ?;
configurable string hub = ?;

listener webhook:Listener ln = new (port, orgName, projName, secret, hub);

service webhook:BugDiscussionService on ln {
    remote function onDiscussionClosed(webhook:BugDiscussionEvent event) {
        // Implement necessary logic if it is required to perform
        // a certain action when a bug discussion is opened.
    }

    remote function onDiscussionCommented(webhook:BugDiscussionOpenedOrCommentedEvent event) {
         
    }

    remote function onDiscussionLabeled(webhook:BugDiscussionLabeledEvent event) {
        
    }

    remote function onDiscussionOpened(webhook:BugDiscussionOpenedOrCommentedEvent event) {
        
    }
}

Import

import projzone/webhook;Copy

Metadata

Released date: over 2 years ago

Version: 0.2.0


Compatibility

Platform: any

Ballerina version: 2201.1.1

GraalVM compatible: Yes


Pull count

Total: 8348

Current verison: 22


Weekly downloads


Other versions