17
6

More than 5 years have passed since last update.

GitHub Slack Appで通知内容をカスタマイズ

Last updated at Posted at 2019-01-24

概要

SlackのChannelとGitHubを連携させ、各種通知を受け取る際に通知内容をカスタマイズできます。このカスタマイズのやり方をいつも忘れのでメモしておきます。

Slack Appのインストール

  • slack.github.comにアクセスし、「Add to Slack」をクリック
  • アプリが必要とするアクセス権限を確認し、「Continue」をクリックして許可
  • アプリがアクセスできるチャンネルを選択 (全てのパブリックチャンネル、特定のチャンネル、なし、等)

これで/githubコマンドが使用できるようになります。

Repositoryの購読

購読には以下のコマンドを通知を流したいChannelで実行します。

/github subscribe owner/repo

Slackへの通知内容のカスタマイズ

GitHub AppはGitHubの各種機能について、イベントが発生した際にSlackへの通知を行います。

デフォルトでの通知内容

デフォルトで通知を行う・通知されない機能は次のようになっています。

デフォルトで通知を行う機能 デフォルトで通知されない機能
issues (イシュー) reviews (レビュー)
pulls (プル) comments (コメント)
statuses (ステータス) branches (ブランチ)
commits (コミット) commits:all (すべてのコミット)
deployments (デプロイメント)
public (パブリック)

通知内容のカスタマイズ

購読する機能を追加するには以下のコマンドを入力します。

/github subscribe owner/repo 機能

また、購読を解除するには次のコマンドを入力します。

/github unsubscribe owner/repo 機能

参考資料

17
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
17
6