Git Product home page Git Product logo

kiyo-slack-notify's Introduction

Kiyo slack notify

How is it used?

First, you have to create a new Slack application, then go to Add features and functionality > Incoming Webhooks and click on Add New Webhook to Workspace.

You must properly set the following environment variables: .env:

PORT - Port of the http server. (Optional) (Default port is 3000)

SLACK_WEBHOOK - your Slack webhook URL Example: https://hooks.slack.com/services/foo/bar/foobar123

SLACK_BOT_TOKEN CHANNEL - Channel on Slack

src/resources/slack_users.json - nickname mapping from GitHub to Slack

Example:

{
    "github-username": "slack-display-name",
    "John": "smith",
}

The keys (ex. "Mystraht") correspond to GitHub nicknames, and the values (ex. "John") correspond to Slack nicknames.

Slack have issue with space in nickname, in this case use instead:

{
    "John-Smith": "john.smith",
    "Jack": {
      id: "SLACK_USER_ID",
      name: "jack"
    },
}

You can then launch the Node server by running:

npm install
npm run start

You will then have to configure your GitHub webhook.

Go to your repository settings, and add a webhook with the following configuration:

Payload URL: http://<YOUR_DOMAIN_or_IP_ADDRESS>:3000/git/webhook
Content type: application/json
Event: Let me select individual events.
    -> Pull request
    -> Pull request review comment
    -> Pull request review

Requirement

This version of Slack pull request notifier is tested with NodeJS LTS.

Contributing

Feel free to submit a pull request!

kiyo-slack-notify's People

Contributors

kiyochinh avatar

Stargazers

Pham Nhu Chinh avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.