Sha256: 7d549b753d3a1ce6d321a3a8ca1cb2a813e053bc9ac8228965cfa76e457f6338
Contents?: true
Size: 1.29 KB
Versions: 25
Compression:
Stored size: 1.29 KB
Contents
# frozen_string_literal: true require "thor" require_relative "../base" module Neetob class CLI module Github module Issues class Create < Base attr_accessor :apps, :issue_title, :issue_description, :issue_assignee, :issue_labels, :sandbox def initialize(apps, issue_title, issue_description = "", issue_assignee = "", issue_labels = "", sandbox = false) super() @apps = apps @issue_title = issue_title @issue_description = issue_description @issue_assignee = issue_assignee @issue_labels = issue_labels @sandbox = sandbox end def run matching_apps = find_all_matching_apps(apps, :github, sandbox) matching_apps.each do |app| ui.info("\n Creating issue in \"#{app}\" \n") begin issue_options = { assignee: issue_assignee, labels: issue_labels } issue = client.create_issue(app, issue_title, issue_description, issue_options) ui.success("Created the issue successfully \nLink: #{issue[:html_url]}") rescue StandardError => e ExceptionHandler.new(e).process end end end end end end end end
Version data entries
25 entries across 25 versions & 2 rubygems