Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Firebaseでslack力を上げる
Search
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.3k
Annotations specific to the Java platform.
tebasakyu
1
1.1k
Kotlin + Javaで始めるAndroid開発
tebasakyu
0
280
Other Decks in Programming
See All in Programming
XHTMLが残したもの
yosuke_furukawa
PRO
2
460
デプロイ直後のレイテンシスパイクを調べたら、 Railsの仕様にたどり着いた
nhsykym
0
110
MIZARU@SPAJAM2026 第二回予選
1901drama
0
110
AI時代に学ぶ 好きなルール 嫌いなルール Linter編
shorty5121
0
890
Claude Codeを組織的に動かして月400PRを実現した話
happy_ryo
0
260
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
3
1.5k
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
340
Oxlintはいいぞ(続)
yug1224
1
560
AWS Step Functions 大規模並列の壁を越える / jaws-sonic-2026-niigata-step-functions
kasacchiful
PRO
0
400
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
690
AIを上手に使っていこうとしたら越境せざるを得なくなった話 〜実践1年で見えた境界を越えなければならない理由と進め方〜 / Crossing borders with AI
tomoyakitaura
4
1.1k
RSSとCodexを使ってX投稿自動化してみた
ochtum
0
110
Featured
See All Featured
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
430
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
710
Become a Pro
speakerdeck
PRO
31
6.2k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.1k
The Curse of the Amulet
leimatthew05
2
14k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
840
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
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