Code Monkey home page Code Monkey logo

hubot's Introduction

PRレビューがアサインされたらSlackのチャンネルに通知する

設定

本リポジトリを外部に公開しておく

ngrokを使う場合

% ngrok http 9999

github webhook

Githubリポジトリ → Settings → Webhooks

  • Payload URLに入力する。
    例:http://example.com/github/webhook
  • Content typeはapplication/jsonに設定する
  • Let me select individual events.Pull requestsにチェックする

Slack

  • hubotをslackに追加する。https://slack.com/apps
  • Slackでhubotをチャンネルに招待する。
  • チャンネルIDとユーザIDをscripts/github.coffeeに書き込む
    (githubでのID:SlackでのIDを対応表に書き込む)

Running

% bin/hubot --adapter slack

実行結果

2018-04-13 5 24 34

MEMO

hubot's People

Contributors

dependabot[bot] avatar harapeko avatar

Watchers

 avatar

hubot's Issues

複数人アサインすると、複数回メンションされるので、1回にまとめる

いま

2018-04-13 5 31 36

どうする?

  • log.txtがなければ作成する
  • 通知する前にlog.txtをみて差分があるか比較する(1回目は空の想定)
  • 終了する:差分がなければ何もしない
  • 通知する:差分があるとき
    • 通知する
    • slack_users 変数の値を書き込む
  • review_requestedだったときは、次回同じ人にメンション送りたいかもしれないので、空にする

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.