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
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
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Slack-Ops始めました 初心者向け "slack-notifier" の基本
Search
strviola
January 15, 2020
Programming
85
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Slack-Ops始めました 初心者向け "slack-notifier" の基本
strviola
January 15, 2020
More Decks by strviola
See All by strviola
安定したFeature Specを助ける3つの処方箋
strviola
0
1.3k
「確認画面」ベストプラクティス
strviola
0
560
Other Decks in Programming
See All in Programming
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
9.3k
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
250
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
210
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
200
テストを司るデーモンに会いに行く 〜隔離した仮想マシンでテストを通すまで〜
h1d3mun3
1
600
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
510
カツオ、ご期待ください
suneo3476
0
130
巨大モノリシックアプリ モダン化大作戦
ktcryomm
1
1.2k
一人だけ、Kiroが静止する日
hideg
0
140
Agents on Rails - Rails at Scale 2026
irinanazarova
0
310
AHC070解法紹介
eijirou
0
150
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
290
Featured
See All Featured
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
3
4.3k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
KATA
mclloyd
PRO
35
16k
We Have a Design System, Now What?
morganepeng
55
8.3k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
390
Exploring anti-patterns in Rails
aemeredith
4
520
Building Adaptive Systems
keathley
44
3.2k
How to Think Like a Performance Engineer
csswizardry
28
2.8k
Faster Mobile Websites
deanohume
310
32k
Design in an AI World
tapps
1
340
Claude Code のすすめ
schroneko
67
230k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Transcript
4MBDL0QT͡Ί·ͨ͠ ॳ৺ऀ͚TMBDLOPUJpFSͷجຊ ϦϯΧʔζגࣜձࣾླཽଠ
ຊͷ࣍ TMBDLOPUJpFSHFNͷհ ॳظઃఆ "1*ͷհ 4MBDL0QTͷ͋Δࣄ
·ͱΊͱࠓޙͷ՝
TMBDLOPUJpFSHFNͷհ w IUUQTHJUIVCDPNTUFWFOPTMPBOTMBDLOPUJpFS w ཁ͢Δʹ)BTIΛ+40/ʹͯ͠)5511045ͯ͘͠ΕΔ # Gemfile gem 'slack-notifier' #
test.rb require 'slack-notifier' notifier = Slack::Notifier.new('WEBHOOK_URL') notifier.ping 'Hello World' # POST https://hooks.slack.com/services/... # Content-type: application/json # { "text": "Hello World" }
ॳظઃఆ w 8FCIPPL63-ͷऔಘ w IUUQTTMBDLDPNBQQT"'9%6";JODPNJOHXFCIPPLTʹΞΫηε w ϫʔΫεϖʔεɺߘઌνϟϯωϧͳͲઃఆ w 63-ઃఆը໘͔Β͍ͭͰ֬ೝߋ৽Մೳ
ॳظઃఆ w 8FCIPPL63-ͷอଘ w DPOpHTFDSFUTZNMFOD͕ແ w ڞ௨Ϋϥε͔Βݺͼग़͠ ฐࣾ"QQMJDBUJPO3FDPSE
w BUUBDINFOUT"1*ʹ͢+40/ # app/models/application_record.rb def slack_webhook_url Rails.application.secrets.slack_webhook_url end def slack_post!(attachments:, webhook_url: slack_webhook_url, username: 'LFB bot') return if webhook_url.blank? notifier = Slack::Notifier.new(webhook_url, username: username) notifier.post attachments: attachments end
"1*ͷհ color pretext title title_link fields[0] fields[1] footer title
title value value
"1*ͷհ # app/models/contact.rb def slack_notify!(host, title: '͓٬༷͔Β͍߹Θ͕ͤ͋Γ·ͨ͠ɻ') url_helper =
Rails.application.routes.url_helpers attachment = { color: '#1155A7', pretext: '<!channel>', title: title, title_link: url_helper.system_managers_contact_url(self, host: host), fields: [ { title: 'ۜߦ໊', value: Bank.current.name }, { title: '͓٬༷ࢯ໊', value: "#{user.name}༷" } ], footer: "#{Rails.env} environment" } slack_post! attachments: [attachment] end
·ͱΊ w TMBDLOPUJpFSHFNͷհ w 8FCIPPL63-ͷऔಘํ๏ w "1*ͷհ w ࠓޙͷ՝ w
ϋοϐʔʹͳΕΔ4MBDL0QT ͍߹ΘͤରԠ͚ͩͩͱؾ͕໓ೖΔ 4MBDLಋೖΰʔϧ͡Όͳ͍ɺελʔτͩ