Class: Fastlane::InspectorReporter

Inherits:
Object
  • Object
show all
Defined in:
lib/fastlane_core/ui/github_issue_inspector_reporter.rb

Overview

Adds all the necessary emojis (obv)

Constant Summary collapse

NUMBER_OF_ISSUES_INLINE =
3

Instance Method Summary collapse

Instance Method Details

#inspector_could_not_create_report(error, query, inspector) ⇒ Object

Called when there have been networking issues in creating the report.



32
33
34
35
36
# File 'lib/fastlane_core/ui/github_issue_inspector_reporter.rb', line 32

def inspector_could_not_create_report(error, query, inspector)
  puts "Could not access the GitHub API, you may have better luck via the website."
  puts "https://github.com/#{inspector.repo_owner}/#{inspector.repo_name}/search?q=#{query}&type=Issues&utf8=✓"
  puts "Error: #{error.name}"
end

#inspector_recieved_empty_report(report, inspector) ⇒ Object

Called once the report has been recieved, but when there are no issues found.



25
26
27
28
29
# File 'lib/fastlane_core/ui/github_issue_inspector_reporter.rb', line 25

def inspector_recieved_empty_report(report, inspector)
  puts "Found no similar issues. To create a new issue, please visit:"
  puts "https://github.com/#{inspector.repo_owner}/#{inspector.repo_name}/issues/new"
  puts "Run `fastlane env` to append the fastlane environment to your issue"
end

#inspector_started_query(query, inspector) ⇒ Object

Called just as the investigation has begun.



8
9
10
11
12
13
# File 'lib/fastlane_core/ui/github_issue_inspector_reporter.rb', line 8

def inspector_started_query(query, inspector)
  puts ""
  puts "Looking for related GitHub issues on #{inspector.repo_owner}/#{inspector.repo_name}..."
  puts "Search query: #{query}" if $verbose
  puts ""
end

#inspector_successfully_recieved_report(report, inspector) ⇒ Object

Called once the inspector has recieved a report with more than one issue.



16
17
18
19
20
21
22
# File 'lib/fastlane_core/ui/github_issue_inspector_reporter.rb', line 16

def inspector_successfully_recieved_report(report, inspector)
  report.issues[0..(NUMBER_OF_ISSUES_INLINE - 1)].each { |issue| print_issue_full(issue) }

  if report.issues.count > NUMBER_OF_ISSUES_INLINE
    puts "and #{report.total_results - NUMBER_OF_ISSUES_INLINE} more at: #{report.url}"
  end
end