Module: Gith::Review

Includes:
Github
Included in:
Commands
Defined in:
lib/gith/commands/review.rb

Constant Summary collapse

SHIPIT =
[':+1:', ':shipit:', ':ship:', ':rocket:']

Constants included from Github

Github::DNM, Github::PASSED_REVIEW, Github::PENDING_REVIEW, Github::REVIEW_ME, Github::WIP

Instance Method Summary collapse

Methods included from Github

#add_comment, #github, #label_pull_request, #labels_for, #open_pull_request, #pull_for, #pull_request, #pull_requests, #remove_label, #remove_labels

Instance Method Details

#pass(id) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/gith/commands/review.rb', line 10

def pass(id)
  @pull_request = pull_request(id)

  notify "Labeling as '#{PASSED_REVIEW}'"

  remove_label        @pull_request, PENDING_REVIEW
  label_pull_request  @pull_request, PASSED_REVIEW
  add_comment         @pull_request, SHIPIT.sample
end