https://github.com/starfish719/github-to-slack-notification-express
GitHubの通知をSlackに送信するスクリプト
https://github.com/starfish719/github-to-slack-notification-express
express github nodejs slack
Last synced: 3 months ago
JSON representation
GitHubの通知をSlackに送信するスクリプト
- Host: GitHub
- URL: https://github.com/starfish719/github-to-slack-notification-express
- Owner: starfish719
- License: mit
- Created: 2017-05-25T10:00:55.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-25T11:07:14.000Z (about 9 years ago)
- Last Synced: 2025-07-24T11:42:22.176Z (11 months ago)
- Topics: express, github, nodejs, slack
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 概要
- GitHubのメンションをSlackに通知する
- コメントとプルリクのメンションに対応している
- Slack側にメンションの通知が飛ぶようになる
# 動作環境
- Node.js
- express
# Slackアプリの認証方法
- https://api.slack.com/applications でアプリケーションを新規作成
- 作成後のClient IDとClient Secretをメモしておく
- 以下のURLにアクセス
- https://slack.com/oauth/authorize?client_id=clientId&scope=chat:write:bot
- リダイレクト先のURLに code というパラメータが付与されているのでメモしておく
- 以下のURLにアクセス
- https://slack.com/api/oauth.access?client_id=clientId&client_secret=clientSecret&code=code
- 表示されたaccess_tokenが今後利用するトークンになる
# 設定方法
- 連携したいリポジトリのSettings画面を開く
- Webhookの追加画面を開く
- Payload URLとイベントは以下のように設定する
- Issueの新規作成
- http://domain/github_issue
- Issue のみにチェックを入れる
- Issueのコメントのメンション通知
- http://domain/github_issue_comment
- Issue comment のみにチェックを入れる
- プルリクのメンション通知
- http://domain/github_pullrequest
- Pull Request のみにチェックを入れる
- コードレビューのコメントのメンション通知
- http://domain/github_commit_comment
- Commit comment と Pull Request review comment にチェックを入れる
- Content Typeは `application/x-www-form-urlencoded` を設定