はじめに
おはこんばんにちは!syomaです。
表題の通りですが、slackにて、githubでのマージやコミットなんかを通知できるようにします!
手順としましては
- slackにgithubをインストール
- slack内でgithub認証をする
- slack内でリポジトリの登録
簡単でございます。では順に参りましょう!
1. slackにgithubをインストール
slack.github.com にアクセスし、「Add to Slack」をクリックします。
2. slack内でgithub認証をする
通知を受けたいslackチャンネルで下記の文を打ちましょう。
/github signin
認証完了するとslackに下記の文が表示されます。
✅Success! @slack名 is now connected to @github名
3. slack内でリポジトリの登録
通知を受けたいチャンネルで、リポジトリを登録するためのコマンドを送信するのじゃっ
/github subscribe owner/repository
owner/repository は 自分のリポジトリにしましょう!
Subscribed to owner/repository
という一文が返ってきたら成功です!
もし、この時点で
Either the app isn't installed on your repository or the repository does not exist. Install it to proceed.
という一文が返ってきた場合

Install GitHub Appをクリックし、下の画像のように「All repositories」にチェックを入れSaveしましょう。

そして、
/github subscribe owner/repository
owner/repository は 自分のリポジトリにしましょう!
以上です!
最後に
twitterやっておりますので是非フォローよろしくお願いいたします。
https://twitter.com/syomabusiness
youtubeも始める予定です。