Class: Fastlane::InspectorReporter

Inherits:
Object
  • Object
show all
Defined in:
fastlane_core/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.


39
40
41
42
43
# File 'fastlane_core/lib/fastlane_core/ui/github_issue_inspector_reporter.rb', line 39

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_received_empty_report(report, inspector) ⇒ Object

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


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

def inspector_received_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.


11
12
13
14
15
16
# File 'fastlane_core/lib/fastlane_core/ui/github_issue_inspector_reporter.rb', line 11

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 FastlaneCore::Globals.verbose?
  puts("")
end

#inspector_successfully_received_report(report, inspector) ⇒ Object

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


19
20
21
22
23
24
25
26
27
28
29
# File 'fastlane_core/lib/fastlane_core/ui/github_issue_inspector_reporter.rb', line 19

def inspector_successfully_received_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
    report.url.sub!('\'', '%27')
    puts("and #{report.total_results - NUMBER_OF_ISSUES_INLINE} more at: #{report.url}")
    puts("")
  end

  print_open_link_hint
end