Sha256: 14a61060165ad9980b76aced5743915f1b1ee122a7c710e8a54bfc7a02df6466

Contents?: true

Size: 677 Bytes

Versions: 5

Compression:

Stored size: 677 Bytes

Contents

#!/usr/bin/env ruby

require "bundler/inline"
gemfile do
  source "https://rubygems.org"
  gem "multi_repo", require: "multi_repo/cli", path: File.expand_path("..", __dir__)
end

opts = Optimist.options do
  opt :labels, "The labels to delete.", :type => :strings, :required => true

  MultiRepo::CLI.common_options(self, :repo_set_default => nil)
end
opts[:repo] = MultiRepo::Helpers::Labels.all.keys.sort unless opts[:repo] || opts[:repo_set]

github = MultiRepo::Service::Github.new(dry_run: opts[:dry_run])

MultiRepo::CLI.each_repo(**opts) do |repo|
  opts[:labels].each do |label|
    puts "Deleting #{label.inspect}"
    github.delete_label!(repo.name, label)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
multi_repo-0.2.1 scripts/delete_labels
multi_repo-0.2.0 scripts/delete_labels
multi_repo-0.1.2 scripts/delete_labels
multi_repo-0.1.1 scripts/delete_labels
multi_repo-0.1.0 scripts/delete_labels