Code Monkey home page Code Monkey logo

githubreviewernotificationforslack's Introduction

GitHub Reviewer Notification for Slack

Why one more Slack App for GitHub?

I know there are already lots of Slack Apps which are used to send notifications about something happens on GitHub to Slack.

But I did not found one with such simple requirement (or maybe it's too hard to find the existing ones), which is, notify me when I was requested as reviewer.

What could it do?

After adding the app into Slack workspace and setting up webhook on GitHub, users can

  1. Link Slack account to GitHub account according to username by one simple command: /link [GitHubUserName], e.g. /link EnixCoda.
  2. When the user is requested as reviewer of a pull request on GitHub, he/she will be notified on Slack immediately! And with the link provided in the message, it will be very easy to check out the PR!

A picture worths a thousand words

How to set up

  1. Add a Webhook in your GitHub repo (set content type to application/json).

  2. Customize your Slack workspace, create a Slack App with Incoming Webhooks and Slash Commands enabled. For the later one, its name should be set to link.

  3. Create a firebase App with real time database enabled. Find firebase config of your app from Project Overview - Add Firebase to your web app, convert the config into JSON.

    Use firebase for storage. You can use any other methods you prefer. Modify src/db.js to achieve that.

  4. Set configs and deploy.

    # I'd recommend now.sh (https://now.sh).
    # set `now secrets` for Firebase configs and Slack App `Incoming Webhooks` URL.
    $ now secrets add SLACK "[the Incoming Webhooks URL you got at step 2]"
    $ now secrets add FIREBASE $(echo '[firebase config JSON string you got at step 3]' | base64)
    $ now --public
    
    # If you'd like to deploy in other way, please set ENV according to `src/config.js`.
    
  5. Set URL of GitHub webhook and Slack Slash Commands to the instance you just deployed.

Done! Enjoy it!

githubreviewernotificationforslack's People

Contributors

enixcoda avatar ijunes avatar

Watchers

 avatar  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.