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
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
わからない話を追いかけたら、プログラミング言語を作る側にいた
ydah
3
530
How I Won Prize Money at a Hackathon Using Codex and Symphony Alpha
yasei_no_otoko
0
110
夏だ!祭りだ!祭りとはドメインモデリングでは?
ryugen04
0
340
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
220
React本体のコードリーディング
high_g_engineer
1
150
楽しそうなつよつよエンジニアと目が死んでる僕/A brilliant engineer having a blast, and dead-eyed me.
3l4l5
2
200
AIが無かった頃の素敵な出会いの話
codmoninc
1
480
S3 を使うアプリケーションをローカル完結で動かすことに全力を注いでみた / Running S3 Apps Offline
contour_gara
0
550
【デモ】Kiroで体験する仕様駆動開発|設計からコーディングまでAIと進める開発フロー
cmkudo
0
260
ここ半年くらいでAIに作らせたR用ツール
eitsupi
0
390
What's New in Android 2026
veronikapj
0
270
仕様駆動開発の消費期限
watany
20
8.8k
Featured
See All Featured
AI: The stuff that nobody shows you
jnunemaker
PRO
9
930
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.5k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
380
Building Applications with DynamoDB
mza
96
7.2k
Mind Mapping
helmedeiros
PRO
1
320
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.1k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
900
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
500
Visualization
eitanlees
152
17k
Odyssey Design
rkendrick25
PRO
2
770
Discover your Explorer Soul
emna__ayadi
2
1.3k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
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