Skip to content

Commit

Permalink
FS-10372: [Build-System,fs-utils] Add fix versions to filebug.pl #res…
Browse files Browse the repository at this point in the history
…olve
  • Loading branch information
anthmFS committed Jun 7, 2017
1 parent fd3d4e4 commit d16a067
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions support-d/utils/filebug.pl
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ sub get_text {
print Dumper $input;
} else {
$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}) {
$input = {
Expand All @@ -253,7 +253,7 @@ sub get_text {

$jira->PUT("/issue/" . $issue->{key}, undef, $input);

print "Fix versions updated for issue " . $issue->{key};;
print "Fix versions updated for issue " . $issue->{key} . "\n";
}


Expand Down
17 changes: 9 additions & 8 deletions support-d/utils/fixbug.pl
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ sub getfield {
my $prog = `which curl` || `which wget`;
my $auto = 1;
my $post = " \#resolve";
my $component;
my $summary;

chomp $prog;

Expand All @@ -65,7 +67,7 @@ sub getfield {
$opts{user} = getfield("User: ");
}

if (!$opts{pass} && !$opts{debug}) {
if (!$opts{pass}) {
$opts{pass} = getpass();
print "\n";
}
Expand Down Expand Up @@ -109,11 +111,10 @@ sub getfield {

my $xs= new XML::Simple;
my $r = $xs->XMLin($xml);
$summary = $r->{channel}->{item}->{summary};
$summary =~ s/\"/\\"/g;

my $sum = $r->{channel}->{item}->{summary};
$sum =~ s/\"/\\"/g;

my $component = $r->{channel}->{item}->{component};
$component = $r->{channel}->{item}->{component};

if(ref($component) eq 'ARRAY') {
$component = join(",", @{$component});
Expand All @@ -131,7 +132,7 @@ sub getfield {
$auto = 0;
$opts{msg} = undef;
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;
}

Expand All @@ -148,12 +149,12 @@ sub getfield {

if ($auto) {
if ($opts{msg}) {
$opts{msg} =~ s/%s/$sum/;
$opts{msg} =~ s/%s/$summary/;
$opts{msg} =~ s/%b/$opts{bug}/;
$opts{msg} =~ s/%c/$component/;
$gitcmd = "git commit $args -m \"$opts{msg}$opts{append}\"";
} 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 {
$gitcmd = "git commit $args -t /tmp/$opts{bug}.tmp";
Expand Down

0 comments on commit d16a067

Please sign in to comment.