FS-7988 #resolve [We can't file bugs from the command line]

This commit is contained in:
Anthony Minessale 2015-08-18 18:33:42 -05:00
parent 7cd0fb54cb
commit 5bee986fb7
1 changed files with 14 additions and 16 deletions

View File

@ -33,9 +33,6 @@ sub get_text {
return $text; return $text;
} }
#my $user = getuser();
#my $pass = getpass();
my %opts; my %opts;
my $hashtxt = `git log -1 --oneline 2>/dev/null`; my $hashtxt = `git log -1 --oneline 2>/dev/null`;
@ -73,7 +70,7 @@ if (!$opts{pass}) {
my $jira = JIRA::REST->new('https://freeswitch.org/jira', $opts{user}, $opts{pass}) or die "login incorrect:"; my $jira = JIRA::REST->new('https://freeswitch.org/jira', $opts{user}, $opts{pass}) or die "login incorrect:";
my $issue = $jira->GET("/issue/FS-7985") or die "login incorrect:"; my $issue = $jira->GET("/issue/FS-7985") or die "login incorrect:";
#print Dumper $issue; #print $issue->{key};
#exit; #exit;
if (!$opts{type}) { if (!$opts{type}) {
@ -102,7 +99,8 @@ if (!$opts{hash}) {
my $issue = $jira->POST('/issue', undef, { my $issue = $jira->POST('/issue', undef,
{
fields => { fields => {
project => { key => 'FS' }, project => { key => 'FS' },
issuetype => { name => $opts{type} }, issuetype => { name => $opts{type} },
@ -112,10 +110,10 @@ my $issue = $jira->POST('/issue', undef, {
customfield_10025 => $opts{hash}, customfield_10025 => $opts{hash},
components => $opts{components_array} components => $opts{components_array}
}, },
}); }) or die "Issue was not created:";
print "Issue Posted"; print "Issue Posted: " . $issue->{key};
__END__ __END__