Sha256: 7ddca511e90d1136e3c251deed6143d6cea6dd39317eac677639f4e29057ce45
Contents?: true
Size: 1.25 KB
Versions: 22
Compression:
Stored size: 1.25 KB
Contents
# frozen_string_literal: true require "thor" require_relative "../base" module Neetob class CLI module Github module Labels class Delete < Base attr_accessor :apps, :sandbox, :labels, :all_neeto_repos def initialize(apps, labels, sandbox = false, all_neeto_repos = false) super() @labels = labels @apps = apps @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 Deleting labels from #{app} repo \n") labels.each do |label| delete_label(app, label) end end end private def delete_label(app, label) if client.delete_label!(app, label) ui.success("The \"#{label}\" label deleted successfully") else ui.error("The \"#{label}\" label can't be deleted. Please check and try again") end end end end end end end
Version data entries
22 entries across 22 versions & 2 rubygems