2022-01-07 19:45:53 +00:00
|
|
|
#!/usr/bin/env ruby
|
|
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
|
|
require "yaml"
|
|
|
|
|
require "open3"
|
|
|
|
|
|
2023-08-14 09:13:37 -05:00
|
|
|
require_relative "../cli"
|
2022-01-07 19:45:53 +00:00
|
|
|
|
|
|
|
|
issue_content, comment_body, labels = ARGV
|
|
|
|
|
|
|
|
|
|
puts labels
|
|
|
|
|
|
|
|
|
|
raise "No issue content provided" if issue_content.nil?
|
|
|
|
|
raise "No comment provided" if comment_body.nil?
|
|
|
|
|
raise "No labels provided" if labels.nil?
|
|
|
|
|
|
|
|
|
|
provider = Provider.new(labels)
|
|
|
|
|
command = Command.new(comment_body)
|
|
|
|
|
|
|
|
|
|
arguments = Arguments.new(provider, command, issue_content)
|
|
|
|
|
|
|
|
|
|
return unless command.valid?
|
|
|
|
|
|
|
|
|
|
provider.to_output
|
|
|
|
|
command.to_output
|
|
|
|
|
arguments.to_output
|