cloudcomponents.cdk-github-webhook-2.1.0
2.1.0
2.0.0
1.9.0
1.8.0
1.7.0
1.6.0
1.50.0
1.5.0
1.49.0
1.48.0
1.47.0
1.46.0
1.45.0
1.44.0
1.43.0
1.42.0
1.41.0
1.40.1
1.40.0
1.4.0
1.39.0
1.38.1
1.38.0
1.37.1
1.37.0
1.36.0
1.35.0
1.34.0
1.33.0
1.32.0
1.31.0
1.30.1
1.30.0
1.3.0
1.29.0
1.28.0
1.27.0
1.26.0
1.25.0
1.24.1
1.24.0
1.23.0
1.22.0
1.21.1
1.21.0
1.20.0
1.2.2
1.2.1
1.2.0
1.19.0
1.18.0
1.17.0
1.16.0
1.15.0
1.14.1
1.14.0
1.13.0
1.12.0
1.11.0
1.10.0
1.1.1
1.1.0
1.0.83
1.0.82
1.0.81
1.0.80
1.0.79
1.0.78
1.0.77
1.0.76
1.0.75
1.0.74
1.0.73
1.0.72
1.0.71
1.0.70
1.0.69
1.0.68
2.1.0
2.0.0
1.9.0
1.8.0
1.7.0
1.6.0
1.50.0
1.5.0
1.49.0
1.48.0
1.47.0
1.46.0
1.45.0
1.44.0
1.43.0
1.42.0
1.41.0
1.40.1
1.40.0
1.4.0
1.39.0
1.38.1
1.38.0
1.37.1
1.37.0
1.36.0
1.35.0
1.34.0
1.33.0
1.32.0
1.31.0
1.30.1
1.30.0
1.3.0
1.29.0
1.28.0
1.27.0
1.26.0
1.25.0
1.24.1
1.24.0
1.23.0
1.22.0
1.21.1
1.21.0
1.20.0
1.2.2
1.2.1
1.2.0
1.19.0
1.18.0
1.17.0
1.16.0
1.15.0
1.14.1
1.14.0
1.13.0
1.12.0
1.11.0
1.10.0
1.1.1
1.1.0
1.0.83
1.0.82
1.0.81
1.0.80
1.0.79
1.0.78
1.0.77
1.0.76
1.0.75
1.0.74
1.0.73
1.0.72
1.0.71
1.0.70
1.0.69
1.0.68
توضیحات
Create, update and delete github webhooks with your app deployment
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | cloudcomponents.cdk-github-webhook-2.1.0 |
| نام | cloudcomponents.cdk-github-webhook |
| نسخه کتابخانه | 2.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | hupe1980 |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://github.com/cloudcomponents/cdk-constructs |
| آدرس اینترنتی | https://pypi.org/project/cloudcomponents.cdk-github-webhook/ |
| مجوز | MIT |
[](https://github.com/cloudcomponents/cdk-constructs)
# @cloudcomponents/cdk-github-webhook
[](https://github.com/cloudcomponents/cdk-constructs/actions?query=workflow=Build)
[](https://github.com/hupe1980/cdkdx)
[](https://www.npmjs.com/package/@cloudcomponents/cdk-github-webhook)
[](https://pypi.org/project/cloudcomponents.cdk-github-webhook/)
[](https://github.com/kolomied/awesome-cdk)
> Create, update and delete github webhooks with your app deployment
## Install
TypeScript/JavaScript:
```bash
npm i @cloudcomponents/cdk-github-webhook
```
Python:
```bash
pip install cloudcomponents.cdk-github-webhook
```
## How to use
```python
import { GithubWebhook } from '@cloudcomponents/cdk-github-webhook';
import { SecretKey } from '@cloudcomponents/cdk-secret-key';
import { Stack, StackProps, aws_apigateway } from 'aws-cdk-lib';
import { Construct } from 'constructs';
export class GithubWebhookStack extends Stack {
constructor(scope: Construct, id: string, props?: StackProps) {
super(scope, id, props);
const api = new aws_apigateway.RestApi(this, 'github-webhook');
api.root.addMethod('POST');
if (typeof process.env.API_TOKEN === 'undefined') {
throw new Error('environment variable API_TOKEN undefined');
}
const githubApiToken = SecretKey.fromPlainText(process.env.API_TOKEN);
// @example https://github.com/cloudcomponents/cdk-constructs
if (typeof process.env.REPO_URL === 'undefined') {
throw new Error('environment variable REPO_URL undefined');
}
const githubRepoUrl = process.env.REPO_URL;
// @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](https://github.com/cloudcomponents/cdk-constructs/tree/master/packages/cdk-github-webhook/API.md).
## Example
See more complete [examples](https://github.com/cloudcomponents/cdk-constructs/tree/master/examples).
## License
[MIT](https://github.com/cloudcomponents/cdk-constructs/tree/master/packages/cdk-github-webhook/LICENSE)
نیازمندی
| مقدار | نام |
|---|---|
| <3.0.0,>=2.8.0 | aws-cdk-lib |
| <3.0.0,>=2.0.0 | cloudcomponents.cdk-secret-key |
| <11.0.0,>=10.0.41 | constructs |
| <2.0.0,>=1.52.1 | jsii |
| >=0.0.3 | publication |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl cloudcomponents.cdk-github-webhook-2.1.0:
pip install cloudcomponents.cdk-github-webhook-2.1.0.whl
نصب پکیج tar.gz cloudcomponents.cdk-github-webhook-2.1.0:
pip install cloudcomponents.cdk-github-webhook-2.1.0.tar.gz