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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
Performance Engineering for Everyone
elenatanasoiu
0
210
Oxlintのカスタムルールの現況
syumai
6
1.1k
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
260
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
21
7k
LaravelLive Japan の裏方のすべて — 第188回 PHP勉強会@東京 (2026-06-24)
suguruooki
2
120
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.5k
エージェンティックRAGにAWSで入門しよう!
har1101
9
1.7k
並列実装の現場、2ヶ月間実務でAIを使い倒したAIもPCも私も限界が近い
ming_ayami
0
130
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
4.5k
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
160
Agentic UI
manfredsteyer
PRO
0
190
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
740
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Un-Boring Meetings
codingconduct
0
320
Prompt Engineering for Job Search
mfonobong
0
350
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
560
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
120k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
480
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Site-Speed That Sticks
csswizardry
13
1.2k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
150
Being A Developer After 40
akosma
91
590k
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