FS-10372: [Build-System,fs-utils] Add fix versions to filebug.pl #resolve
This commit is contained in:
parent
fd3d4e4d31
commit
d16a0677a9
|
@ -239,7 +239,7 @@ if ($opts{debug}) {
|
||||||
print Dumper $input;
|
print Dumper $input;
|
||||||
} else {
|
} else {
|
||||||
$issue = $jira->POST('/issue', undef, $input) or die "Issue was not created:";
|
$issue = $jira->POST('/issue', undef, $input) or die "Issue was not created:";
|
||||||
print "Issue Posted: " . $issue->{key};
|
print "Issue Posted: " . $issue->{key} . "\n";
|
||||||
|
|
||||||
if ($opts{versions_array}) {
|
if ($opts{versions_array}) {
|
||||||
$input = {
|
$input = {
|
||||||
|
@ -253,7 +253,7 @@ if ($opts{debug}) {
|
||||||
|
|
||||||
$jira->PUT("/issue/" . $issue->{key}, undef, $input);
|
$jira->PUT("/issue/" . $issue->{key}, undef, $input);
|
||||||
|
|
||||||
print "Fix versions updated for issue " . $issue->{key};;
|
print "Fix versions updated for issue " . $issue->{key} . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,8 @@ my $cmd;
|
||||||
my $prog = `which curl` || `which wget`;
|
my $prog = `which curl` || `which wget`;
|
||||||
my $auto = 1;
|
my $auto = 1;
|
||||||
my $post = " \#resolve";
|
my $post = " \#resolve";
|
||||||
|
my $component;
|
||||||
|
my $summary;
|
||||||
|
|
||||||
chomp $prog;
|
chomp $prog;
|
||||||
|
|
||||||
|
@ -65,7 +67,7 @@ if ($opts{auth}) {
|
||||||
$opts{user} = getfield("User: ");
|
$opts{user} = getfield("User: ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$opts{pass} && !$opts{debug}) {
|
if (!$opts{pass}) {
|
||||||
$opts{pass} = getpass();
|
$opts{pass} = getpass();
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
||||||
|
@ -109,11 +111,10 @@ if ($opts{auth}) {
|
||||||
|
|
||||||
my $xs= new XML::Simple;
|
my $xs= new XML::Simple;
|
||||||
my $r = $xs->XMLin($xml);
|
my $r = $xs->XMLin($xml);
|
||||||
|
$summary = $r->{channel}->{item}->{summary};
|
||||||
|
$summary =~ s/\"/\\"/g;
|
||||||
|
|
||||||
my $sum = $r->{channel}->{item}->{summary};
|
$component = $r->{channel}->{item}->{component};
|
||||||
$sum =~ s/\"/\\"/g;
|
|
||||||
|
|
||||||
my $component = $r->{channel}->{item}->{component};
|
|
||||||
|
|
||||||
if(ref($component) eq 'ARRAY') {
|
if(ref($component) eq 'ARRAY') {
|
||||||
$component = join(",", @{$component});
|
$component = join(",", @{$component});
|
||||||
|
@ -131,7 +132,7 @@ if ($opts{msg} eq "edit") {
|
||||||
$auto = 0;
|
$auto = 0;
|
||||||
$opts{msg} = undef;
|
$opts{msg} = undef;
|
||||||
open T, ">/tmp/$opts{bug}.tmp";
|
open T, ">/tmp/$opts{bug}.tmp";
|
||||||
print T "$opts{bug}${post} [$sum]\n\n---Cut this line to confirm commit.....";
|
print T "$opts{bug}${post} [$summary]\n\n---Cut this line to confirm commit.....";
|
||||||
close T;
|
close T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,12 +149,12 @@ if ($opts{comment}) {
|
||||||
|
|
||||||
if ($auto) {
|
if ($auto) {
|
||||||
if ($opts{msg}) {
|
if ($opts{msg}) {
|
||||||
$opts{msg} =~ s/%s/$sum/;
|
$opts{msg} =~ s/%s/$summary/;
|
||||||
$opts{msg} =~ s/%b/$opts{bug}/;
|
$opts{msg} =~ s/%b/$opts{bug}/;
|
||||||
$opts{msg} =~ s/%c/$component/;
|
$opts{msg} =~ s/%c/$component/;
|
||||||
$gitcmd = "git commit $args -m \"$opts{msg}$opts{append}\"";
|
$gitcmd = "git commit $args -m \"$opts{msg}$opts{append}\"";
|
||||||
} else {
|
} else {
|
||||||
$gitcmd = "git commit $args -m \"$opts{bug}: [$component] $sum$opts{append}${post}\"";
|
$gitcmd = "git commit $args -m \"$opts{bug}: [$component] ${summary}$opts{append}${post}\"";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$gitcmd = "git commit $args -t /tmp/$opts{bug}.tmp";
|
$gitcmd = "git commit $args -t /tmp/$opts{bug}.tmp";
|
||||||
|
|
Loading…
Reference in New Issue