FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Dev-Thought/nestjs-github-webhooks: Connect your Github webhooks with NestJs - modern, fast, powerful node.js web framework · GitHub

Repository files navigation

A progressive Node.js framework for building efficient and scalable server-side applications, heavily inspired by Angular.

Description

Github Webhooks module for Nest.

Installation

$ npm i --save @dev-thought/nestjs-github-webhooks

Quick Start

Import module

In app.module.ts:

import { GithubWebhooksModule } from '@dev-thought/nestjs-github-webhooks';

@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

import {
  GithubGuard,
  GithubWebhookEvents,
} from '@dev-thought/nestjs-github-webhooks';

@Controller()
export class AppController {

  @UseGuards(GithubGuard)
  @Post()
  githubWebhoook() {
    ...
  }

  @UseGuards(GithubGuard)
  @GithubWebhookEvents(['push', 'pullrequest'])
  @Post('withGithubEvent')
  withRestrictedGithubEvents() {
    ...
  }
}

Tutorial

You can read more about this integration here

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

License

This Module is MIT licensed.

About

Connect your Github webhooks with NestJs - modern, fast, powerful node.js web framework

Topics

Resources

Contributing

Stars

11 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages


Back | FazBrowse Home | New Git URL