New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

webhook-github-n-slack

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webhook-github-n-slack

Easy and fast webhook set-up for GitHub and Slack

latest
Source
npmnpm
Version
2.1.3
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

Small server to fast run webhook server for GitHub and/or Slack.

###How it works. First:

npm i --save webhook-github-n-slack

webhook function accept obj as argument with following structure:

import webhook from 'webhook-github-n-slack';

let config = {
    github: {
        autoGitPull: true,
        branch: "master",
        path: '/webhook', //payload URL (http:/domain.com:5254/webhook)
        secret: '**********',
        projectRoot: '/var/www/vhosts/domain.com/httpdocs' //local path to project
    },
    slack: {
        url: 'https://hooks.slack.com/services/******/******/***********', //slack webhook URL
        channel: 'development',
        projectName: 'name'
    },
    port: 5254,
    exec: ['npm run restart', 'NODE_ENV=production webpack'], // pass any shell command/s, it will run after function was execute by event or schedule 
};

...
/* your server */ 
...

webhook(config);

You can pass only Git, Slack or both configs together. Else if you pass schedule property it will schedule auto run of function each specified days and at specified time, besides webhook, for example to keep project up-to-date and avoid any local changes in project.

If you have any suggestion please leave me a message.

star to be up to date.

Keywords

github

FAQs

Package last updated on 14 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts