Class: OttInfra::CodeReview
- Inherits:
-
Object
- Object
- OttInfra::CodeReview
- Defined in:
- lib/ottinfra/codereview.rb
Class Method Summary collapse
Instance Method Summary collapse
- #get_review_info ⇒ Object
-
#initialize ⇒ CodeReview
constructor
A new instance of CodeReview.
Constructor Details
#initialize ⇒ CodeReview
Returns a new instance of CodeReview.
8 9 10 |
# File 'lib/ottinfra/codereview.rb', line 8 def initialize @g = Git.open( find_git_root ) end |
Class Method Details
.run ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/ottinfra/codereview.rb', line 12 def self.run codereview = self.new review = codereview.get_review_info unless review[:reviewers].nil? OttInfra::SendMail.new.send( review[:reviewers], subject: "CodeReview", message: "Message", attach: [review[:patch]] ) end end |
Instance Method Details
#get_review_info ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/ottinfra/codereview.rb', line 24 def get_review_info { :author => , :reviewers => get_reviewers, :patch => get_patch } end |