Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Firebaseでslack力を上げる
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
tebasakyu
June 23, 2017
Programming
2k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Firebaseでslack力を上げる
Otemachi Firebase #2
tebasakyu
June 23, 2017
More Decks by tebasakyu
See All by tebasakyu
育児 × 在宅勤務のTips
tebasakyu
5
6.3k
育児タスクのカンバン管理 離乳食編
tebasakyu
1
2.2k
Annotations specific to the Java platform.
tebasakyu
1
1.1k
Kotlin + Javaで始めるAndroid開発
tebasakyu
0
280
Other Decks in Programming
See All in Programming
ビデオ通話が繋がる0.2秒で何が起きているのか
supurazako
2
150
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
250
信頼性について考えてみる(SRE NEXT 2026 miniLT)
hayama17
0
200
PHPだって関数型したい 〜できること、できないこと〜 / fp-in-php
jsoizo
0
220
act2-costs.pdf
sumedhbala
0
120
継続モナドとリアクティブプログラミング
yukikurage
3
610
【やさしく解説 設計編 #1】「ドメイン駆動」と「実装駆動」ってなに? 〜設計の考え方を、たとえ話で学ぼう〜
panda728
PRO
1
120
Performance Engineering for Everyone
elenatanasoiu
0
270
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
930
yield再入門 #phpcon
o0h
PRO
0
560
1B+ /day規模のログを管理する技術
broadleaf
0
140
ランチタイムLT会3周年!ランチタイムLT会を3年間続けられたお話
y0hgi
1
140
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
How to make the Groovebox
asonas
2
2.3k
What's in a price? How to price your products and services
michaelherold
247
13k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
970
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
350
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
150
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
Skip the Path - Find Your Career Trail
mkilby
1
170
Fashionably flexible responsive web design (full day workshop)
malarkey
408
67k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Transcript
Firebaseでslack力を上げる Otemachi Firebase #2 @tebasakyu
自己紹介 • 鈴木 誠 (Makoto Suzuki) ◦ 娘: 遙華(Haruka) 4ヶ月
• Monstar Lab, Inc. • Android Engineer • Twitter: @tebasakyu • GitHub: @tebasakyu
いつものやつ
前提や状況など • GitHubとslackでユーザー名が異なる ◦ 今回の例 ▪ GitHub: @tebasakyu ▪ slack:
@tebasaki • プロジェクトメンバーが多く、GitHubの動きが活発 • または他の通知系も同一channelにまぜまぜしすぎ
GitHub上で普通にメンションしたもの GitHub上でslackのユーザー名を記述したもの
どちらもslackで通知が来ない。 ※ハイライトも通知はされない 見逃すと困るからメールチェックする。 結局メール見てる。slack力が低い!
Cloud Functions for Firebase を使う Firebaseの公式サンプルに手を加えていく形です。 Post GitHub commits to
Slack channel. https://github.com/firebase/functions-samples/tree/master/github-to-slack
Functionsの役割 • GitHub上のアクションをHookする ◦ WebHookのPayloal URLにFuncionsのURLを指定 • GitHubの“@abc”を、slackの”@xyz”に置換する • slackのIncoming
Webhooksに編集したものをPOSTする ◦ API: https://api.slack.com/methods/chat.postMessage
Realtime Database も使う • GitHubとslackのユーザー名をマッピングする
../functions/index.js
None
結果 これならslackだけ眺めてても、メンションを見逃さな い。
注意 Blazeプラン(従量制)でないと、外部APIと連携できません。 https://firebase.google.com/pricing/#blaze-calculator ※200万発/月 までFreeです。
おまけ - Hostingを使って手間を減らす ユーザー名マッピング用のページを用意してDBにsetする ../public/index.html
参考 • 公式サンプル (Post GitHub commits to Slack channel.) ◦
https://github.com/firebase/functions-samples/tree/master/github-to-slack • Cloud Functions for Firebaseとは? ◦ http://qiita.com/koki_cheese/items/013d4e6ab5aefc792388 • SlackのGitHub連携をやめGitHub->AmazonSNS->Lambda->Slackで連携する ◦ http://qiita.com/ooharabucyou/items/2a3dca643f6b7783d665