egg-gitlab-webhook

0.1.8 • Public • Published

🥚Egg plugin for processing gitlab Webhooks.

Installation

npm install egg-gitlab-webhook
yarn add egg-gitlab-webhook

Usage

// plugin.js
gitlabWebhook: {
  enable: true,
  package: 'egg-gitlab-webhook',
}
// config.default.js
gitlabWebhook: {
  path: '/',
  secret: '', // gitlab 秘钥
  event: {
    // push: './scripts/webhook.js',
    push: () => {
    },
    push: function (event) {
    },
  }
}

Example

event: {
  push: (event) => {
    if (event.payload) {
      console.log(event.payload);
    }
  };
}

Readme

Keywords

none

Package Sidebar

Install

npm i egg-gitlab-webhook

Weekly Downloads

9

Version

0.1.8

License

MIT

Unpacked Size

7.42 kB

Total Files

7

Last publish

Collaborators

  • thomasyxy