Class: Danger::DangerLgtm
- Inherits:
-
Plugin
- Object
- Plugin
- Danger::DangerLgtm
- Includes:
- Lgtm::Network
- Defined in:
- lib/lgtm/plugin.rb
Overview
Lgtm let danger say lgtm when there is no violations. Default use random lgtm image from [lgtm.in](lgtm.in).
Constant Summary collapse
- LGTM_URL =
'https://www.lgtm.app'.freeze
- RANDOM_POST_PATH =
'/g/'.freeze
- POST_CONTENT_PATH =
'/p/'.freeze
Instance Method Summary collapse
-
#check_lgtm(image_url: nil, https_image_only: false) ⇒ nil
check_lgtm Comment LGTM markdown if report has no violations.
Methods included from Lgtm::Network
#parse_redirect_location, #process_request
Instance Method Details
#check_lgtm(image_url: nil, https_image_only: false) ⇒ nil
check_lgtm Comment LGTM markdown if report has no violations
34 35 36 37 38 39 40 41 42 43 |
# File 'lib/lgtm/plugin.rb', line 34 def check_lgtm(image_url: nil, https_image_only: false) return if status_report[:errors].any? return if status_report[:warnings].any? if image_url comment image_url else comment fetch_image_url(https_image_only) end end |