%ignore update fixbug.pl to include component
This commit is contained in:
parent
3387b90705
commit
78a5660127
|
@ -45,6 +45,14 @@ my $r = $xs->XMLin($xml);
|
||||||
my $sum = $r->{channel}->{item}->{summary};
|
my $sum = $r->{channel}->{item}->{summary};
|
||||||
$sum =~ s/\"/\\"/g;
|
$sum =~ s/\"/\\"/g;
|
||||||
|
|
||||||
|
my $component = $r->{channel}->{item}->{component};
|
||||||
|
|
||||||
|
if(ref($component) eq 'ARRAY') {
|
||||||
|
$component = join(",", @{$component});
|
||||||
|
}
|
||||||
|
|
||||||
|
$component =~ s/\"/\\"/g;
|
||||||
|
|
||||||
if ($opts{msg} eq "edit") {
|
if ($opts{msg} eq "edit") {
|
||||||
$auto = 0;
|
$auto = 0;
|
||||||
$opts{msg} = undef;
|
$opts{msg} = undef;
|
||||||
|
@ -68,9 +76,10 @@ if ($auto) {
|
||||||
if ($opts{msg}) {
|
if ($opts{msg}) {
|
||||||
$opts{msg} =~ s/%s/$sum/;
|
$opts{msg} =~ s/%s/$sum/;
|
||||||
$opts{msg} =~ s/%b/$opts{bug}/;
|
$opts{msg} =~ s/%b/$opts{bug}/;
|
||||||
|
$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} #resolve [$sum]$opts{append}\"";
|
$gitcmd = "git commit $args -m \"$opts{bug}: [$componet] $sum$opts{append} #resolve\"";
|
||||||
}
|
}
|
||||||
} 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