run

in lib/gdk/command/report.rb [56:93]


      def run(_ = [])
        @report_id = SecureRandom.uuid
        template_path = GDK.root.join(REPORT_TEMPLATE_PATH)
        GDK::Output.info('We are collecting report details, this might take a minute ...')

        
        report_json = {
          report_id: report_id,
          os_name: debug_info.os_name,
          arch: debug_info.arch,
          ruby_version: debug_info.ruby_version,
          gdk_version: debug_info.gdk_version,
          package_manager: package_manager,
          env_variables: env_variables,
          gdk_config: gdk_config,
          gdk_doctor: gdk_doctor,
          gem_env: gem_env,
          bundle_env: bundle_env,
          network_information: network_information,
          logs: logs,
          git_repositories: git_repositories,
          date_time: date_time
        }

        
        renderer = Templates::ErbRenderer.new(template_path, report_json: report_json)
        report_content = renderer.render_to_string

        GDK::Output.puts report_content
        open_browser
        copy_clipboard(report_content)

        GDK::Output.info('This report has been copied to your clipboard.')
        GDK::Output.info('We opened the browser with a new issue, please paste this report from your clipboard into the description.')

        true
      end