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
3k
ぺろぺろ - 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
13k
アイマスハッカソン 2017-ライブの感動を再現する
mzp
1
2.2k
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
A Tale of Four Properties
chriscoyier
155
22k
GraphQLとの向き合い方2022年版
quramy
43
13k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.3k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
327
21k
Why Our Code Smells
bkeepers
PRO
334
57k
What the flash - Photography Introduction
edds
67
11k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
41
9.2k
Learning to Love Humans: Emotional Interface Design
aarron
271
40k
Infographics Made Easy
chrislema
239
18k
We Have a Design System, Now What?
morganepeng
49
7.1k
Atom: Resistance is Futile
akmur
261
25k
Building Applications with DynamoDB
mza
90
6k
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 ֦ு͍͢͠Α͏ʹίϯϙʔωϯτׂ͞Ε͍ͯΔ