# frozen_string_literal: true require "thor" require_relative "../base" module Neetob class CLI module Github module Labels class Show < Base attr_accessor :apps, :label_name, :sandbox, :all_neeto_repos def initialize(apps, label_name, sandbox = false, all_neeto_repos = false) super() @apps = apps @label_name = label_name @sandbox = sandbox @all_neeto_repos = all_neeto_repos end def run check_for_apps_and_all_neeto_repos_option(apps, all_neeto_repos) matching_apps = find_all_matching_apps(apps, :github, sandbox, false, all_neeto_repos) matching_apps.each do |app| ui.info("\n \"#{label_name}\" label details from #{app} \n") begin label_details = client.label(app, label_name) ui.success(label_details.inspect) rescue StandardError => e ExceptionHandler.new(e).process end end end end end end end end