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
Measuring & Analyzing Core Web Vitals
bluesmoon
4
170
Thoughts on Productivity
jonyablonski
67
4.4k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
Designing for humans not robots
tammielis
250
25k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
Being A Developer After 40
akosma
87
590k
Side Projects
sachag
452
42k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
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 ֦ு͍͢͠Α͏ʹίϯϙʔωϯτׂ͞Ε͍ͯΔ