Sha256: f856b3b5d51359b105e3d7efb76acd619b210916176e1340bd8f722d2f65913e
Contents?: true
Size: 1.27 KB
Versions: 1
Compression:
Stored size: 1.27 KB
Contents
# frozen_string_literal: true require "thor" require_relative "../base" module Neetob class CLI module Github module Labels class Delete < Base attr_accessor :repos, :sandbox, :labels, :all_neeto_repos def initialize(repos, labels, sandbox = false, all_neeto_repos = false) super() @labels = labels @repos = repos @sandbox = sandbox @all_neeto_repos = all_neeto_repos end def run check_for_apps_and_all_neeto_repos_option(repos, all_neeto_repos) matching_repos = find_all_matching_apps_or_repos(repos, :github, sandbox, false, all_neeto_repos) matching_repos.each do |repo| ui.info("\n Deleting labels from #{repo} repo \n") labels.each do |label| delete_label(repo, label) end end end private def delete_label(repo, label) if client.delete_label!(repo, 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
neetob-0.2.3 | lib/neetob/cli/github/labels/delete.rb |