How to use @cloudcomponents/cdk-github-webhook - 1 common examples

To help you get started, we’ve selected a few @cloudcomponents/cdk-github-webhook examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cloudcomponents / cdk-components / examples / github-webhook-example / src / github-webhook-stack.ts View on Github external
public constructor(parent: App, name: string, props?: StackProps) {
        super(parent, name, props);

        const api = new RestApi(this, 'github-webhook');
        api.root.addMethod('POST');

        const githubApiToken = process.env.API_TOKEN as string;

        // @example https://github.com/cloudcomponents/cdk-components
        const githubRepoUrl = process.env.REPO_URL as string;

        // @see https://developer.github.com/v3/activity/events/types/
        const events = ['*'];

        new GithubWebhook(this, 'GithubWebhook', {
            githubApiToken,
            githubRepoUrl,
            payloadUrl: api.url,
            events,
            logLevel: 'debug',
        });
    }
}

@cloudcomponents/cdk-github-webhook

Create, update and delete github webhooks with your app deployment

MIT
Latest version published 10 days ago

Package Health Score

78 / 100
Full package analysis

Popular @cloudcomponents/cdk-github-webhook functions