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
ぺろぺろ - Github pull request bot framework -
Search
mzp
February 11, 2017
2
3.1k
ぺろぺろ - Github pull request bot framework -
名古屋Ruby会議 03
mzp
February 11, 2017
Tweet
Share
More Decks by mzp
See All by mzp
アイドルとして勤務する -理論と実践- / Work as cute idol. - theory & practice - #imas_hack
mzp
2
18k
日本語入力の落とし穴
mzp
4
14k
アイマスハッカソン 2017-ライブの感動を再現する
mzp
1
2.3k
The reason for using reason
mzp
2
2.9k
Love💕LivePhotos
mzp
0
1.4k
日本語入力とLisp
mzp
1
3.2k
Amazon EC2 スポットインスタンスを開発環境にする話
mzp
0
1.5k
クラウドサービスを活用した開発環境
mzp
1
3.2k
Rubyistのための型入門
mzp
20
5.9k
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
GraphQLとの向き合い方2022年版
quramy
43
13k
RailsConf 2023
tenderlove
29
900
Producing Creativity
orderedlist
PRO
341
39k
Documentation Writing (for coders)
carmenintech
65
4.4k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Music & Morning Musume
bryan
46
6.2k
Making Projects Easy
brettharned
115
5.9k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
A Philosophy of Restraint
colly
203
16k
Transcript
ΖΖ N[Q (JUIVCQVMMSFRVFTUCPUGSBNFXPSL
None
None
w ίϯϑϦΫτʹؾ͍ͨΒڭ͑ͯ͋͛Α͏ w ίϝϯτͨ͠Β4MBDLͰ͑Α͏ w ϨϏϡʔΛґཔ͢Δͱ͖4MBDLͰ͑Α͏ w
ӡ༻ϧʔϧͷCPUԽ " ➡ ࠓͷςʔϚ
͍ํ
%FQMPZUPIFSPLV
8FCIPPLͷઃఆ
ΧελϚΠζ source 'https://rubygems.org' gem 'prpr' gem 'prpr-slack' gem 'prpr-mention_comment' gem
'prpr-checklist' gem 'prpr-conflict_label' # <= ه
طଘϓϥάΠϯͷհ
QSQSDIFDLMJTU
None
QSQSNFOUJPO@DPNNFOU
None
QSQSHFNpMF
QSQSDPOqJDU@MBCFM
·ͱΊ طଘϓϥάΠϯͷհ w QSQSDIFDLMJTUνΣοΫϦετͷߘ w QSQSNFOUJPO@DPNNFOU4MBDLͷίϝϯτసૹ w QSQSHFNpMF(FNpMFMPDLͷEJ⒎දࣔ w QSQSDPOqJDU@MBCFMDPOqJDUͷՄࢹԽ
.JTPDB։ൃϑϩʔͱͷ ౷߹
8*1 ϨϏϡʔ Ϛʔδ σϓϩΠ
w ૬ޓʹϨϏϡʔ͢Δ w جຊతʹ4MBDLͰΓͱΓΛ͢Δ IUUQTSFDSVJUNJTPDBKQ ৄࡉͪ͜Β
QSQSSFWJFX@MBCFM
QSQSMHUN
None
QSQSNFSHFE
σϓϩΠ CPUʹσϓϩΠΛґཔ͢Δ σϓϩΠ༻ͷϓϧϦΫΤετ͕࡞͞ΕΔ Ϛʔδ͢ΔͱɺσϓϩΠ͞ΕΔ
QSQSDPEF@EFQMPZ DPNNJUJE
·ͱΊ .JTPDB։ൃϑϩʔͱͷ౷߹ w QSQSSFWJFX@MBCFMϨϏϡʔґཔ w QSQSMHUN-(5.ͷՄࢹԽ w QSQSNFSHFEϚʔδ௨ w QSQSDPEF@EFQMPZσϓϩΠ
ઌߦࣄྫ
None
None
ϓϥάΠϯͰ֦ுͰ͖ΔCPU w IVCPU w 3VCPUZ w
ઃܭ
ඪ w HFNʹΑΔ֦ு w ཧऀҎ֎ઃఆมߋͰ͖ΔΑ͏ʹ͢Δ w IFSPLVͰಈ࡞͢Δ w ͬ͞͞ͱಈ͔͢
ߏ http CLI Handler Action Publisher GithubAPI ઃఆ ϓϥάΠϯ ίΞ
ྫ)BOEMFS class Prpr::Handler::Merged < Prpr::Handler::Base handle Event::PullRequest, action: /closed/ do
Prpr::Action::Merged::Merged.new(event).call end end
ྫ"DUJPO class Prpr::Action::Merged < Prpr::Action::Base def call if merged?
Publisher::Adapter::Base.broadcast message end end private def merged? !!event.pull_request.merged_at end .....
ྫ"DUJPO def message Prpr::Publisher::Message.new(body: body, from: from, room: room)
end def body env.format(:merged_body, event.pull_request) end def from event.sender end def room env[:merged_room] end
Βͳ͔ͬͨ͜ͱ w 8FC6*Λ࡞Βͳ͍ w #JUCVDLFU(JU-BCͷ͜ͱΕΔ
໋໊
Α͔ͬͨͱ͜Ζ w HFNԽͨ͠ͷͰɺϓϥάΠϯͱͷڥ͕໌֬ʹͳͬ ͨ w $-*Ͱಈ࡞͢ΔΑ͏ʹͨ͠ͷͰςετָ͕ w ֎෦"1*Λୟ͘෦͕ϓϥάΠϯͳͷͰɺຊମͷς ετָ͕
ۤ࿑ͨ͠ w (JUIVCͷ৽ػೳ͕ͳ͔ͳ͔"1*ʹͳΒͳ͍ w PDUPLJUʹ͍Βͳ͍ w େྔͷHFNTQFDΛॻ͘ͷ͕μϧ͍
·ͱΊ w ϓϧϦΫΤετ༻CPUϑϨʔϜϫʔΫΛ࡞ͬͨ w .JTPDBͷ։ൃϑϩʔʹࠐ·Ε͍ͯΔ w ֦ு͍͢͠Α͏ʹίϯϙʔωϯτׂ͞Ε͍ͯΔ