Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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',
});
}
}