@dev-thought/nestjs-github-webhooks
v1.0.0
Published
Connect your Github webhooks with NestJs - modern, fast, powerful node.js web framework
Downloads
1,961
Readme
Description
Github Webhooks module for Nest.
Installation
$ npm i --save @dev-thought/nestjs-github-webhooks
Quick Start
Import module
@Module({
imports: [
...
GithubWebhooksModule.forRoot({
webhookSecret: 'YOUR_WEBHOOK_APIKEY'
}),
];
})
class AppModule {}
Async import example
@Module({
imports: [
...
GithubWebhooksModule.forRootAsync({
useFactory: () => ({ webhookSecret: 'SomeSecret' })
})
];
})
class AppModule {}
Use the guard
@Controller()
export class AppController {
@UseGuards(GithubGuard)
@Post()
githubWebhoook() {
...
}
@UseGuards(GithubGuard)
@GithubWebhookEvents(['push', 'pullrequest'])
@Post('withGithubEvent')
withRestrictedGithubEvents() {
...
}
}
Tutorial
You can read more about this integration coming soon
Support
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.
Stay in touch
- Author Github Webhooks Module for NestJS - Mitko Tschimev
- Twitter Author - Mitko Tschimev
- Author NestJS - Kamil Myśliwiec
- Website NestJS - https://nestjs.com
- Twitter NestJS - @nestframework
License
This Module is MIT licensed.