ADD: added close_commit support
This commit is contained in:
parent
8a7ef2b33e
commit
d0a8d76526
@ -292,6 +292,7 @@ sub parseIssue
|
||||
my $estimated = $d->find("estimated");
|
||||
my $working = $d->find("working");
|
||||
my $tags = $d->find("tags");
|
||||
my $close_commit = $d->find("close_commit");
|
||||
my $id = $tag . "-" . substr($subject->hash(),0,8);
|
||||
my $cd = $d->find("creation_date");
|
||||
my $ld = $d->find("last_change_date");
|
||||
@ -341,6 +342,11 @@ sub parseIssue
|
||||
$issue->closed_date(DateTime->from_epoch( epoch =>$cld->content, time_zone=>$tz));
|
||||
}
|
||||
|
||||
if (defined($close_commit) && $issue->status eq "closed")
|
||||
{
|
||||
$issue->close_commit($close_commit->content());
|
||||
}
|
||||
|
||||
if (defined($worker))
|
||||
{
|
||||
$worker->content()=~/^(.*)\<(.*)\>$/;
|
||||
|
@ -289,6 +289,14 @@ has 'working_time' => (is => 'rw', isa=>'Num', default => 0, trigger => sub {
|
||||
});
|
||||
|
||||
|
||||
=attr close_commit
|
||||
|
||||
the hash of the commit which closed this issue
|
||||
|
||||
=cut
|
||||
has 'close_commit' => (is => 'rw', isa=>'Str', default =>"");
|
||||
|
||||
|
||||
=method addTag
|
||||
|
||||
add another tag to the issue.
|
||||
@ -529,6 +537,14 @@ sub createIssue
|
||||
$issueTree->add($comment);
|
||||
}
|
||||
|
||||
if (defined($self->close_commit) && length($self->close_commit)> 0 && $self->status eq "closed")
|
||||
{
|
||||
my $close_commit = $issueTree->newBlob();
|
||||
$close_commit->path("close_commit");
|
||||
$close_commit->_content($self->close_commit);
|
||||
$issueTree->add($close_commit);
|
||||
}
|
||||
|
||||
if (defined($self->description) && length($self->description)> 0)
|
||||
{
|
||||
my $description = $issueTree->newBlob();
|
||||
|
Loading…
Reference in New Issue
Block a user