Create, update and delete github webhooks with your app deployment
Project description
@cloudcomponents/cdk-github-webhook
Create, update and delete github webhooks with your app deployment
Install
TypeScript/JavaScript:
npm i @cloudcomponents/cdk-github-webhook
Python:
pip install cloudcomponents.cdk-github-webhook
How to use
# Example automatically generated from non-compiling source. May contain errors.
import { RestApi } from '@aws-cdk/aws-apigateway';
import { Construct, Stack, StackProps } from '@aws-cdk/core';
import { GithubWebhook } from '@cloudcomponents/cdk-github-webhook';
import { SecretKey } from '@cloudcomponents/cdk-secret-key';
export class GithubWebhookStack extends Stack {
constructor(scope: Construct, id: string, props?: StackProps) {
super(scope, id, props);
const api = new RestApi(this, 'github-webhook');
api.root.addMethod('POST');
const githubApiToken = SecretKey.fromPlainText(process.env.API_TOKEN as string);
// @example https://github.com/cloudcomponents/cdk-constructs
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',
});
}
}
API Reference
See API.md.
Example
See more complete examples.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cloudcomponents.cdk-github-webhook-1.48.0.tar.gz.
File metadata
- Download URL: cloudcomponents.cdk-github-webhook-1.48.0.tar.gz
- Upload date:
- Size: 544.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8bb5106ce611cff44b68ec12f2dbf5687e76d3c87c2f80e7d079b9f7e9456333
|
|
| MD5 |
fe82af59bf05f10a251dc963ef74dc27
|
|
| BLAKE2b-256 |
0f1cef06b11618e84f83be42e25571ae2d87926338e24f6cd02a42b245228ec8
|
File details
Details for the file cloudcomponents.cdk_github_webhook-1.48.0-py3-none-any.whl.
File metadata
- Download URL: cloudcomponents.cdk_github_webhook-1.48.0-py3-none-any.whl
- Upload date:
- Size: 543.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b32e356f3b7b01fcf625018dfb8888bbd2855903d11582b739cb7538e2967773
|
|
| MD5 |
42cae656164dd23f1a41c35569506bd4
|
|
| BLAKE2b-256 |
d5b5324b97fcd522a6f7cc23ba240740d8a1976164114544f56fc8b9b7c37668
|