Bot-BasicBot-Pluggable-Module-JIRA
view release on metacpan or search on metacpan
prepended to the status name. Instead of this, you may want the bot to
respond using more colloquial language. You may do this by setting
status_verbs to a hashref mapping status names to status verb phrases.
(ie, { Open => 'opened' }) Any missing pairs default to "changed to".
status_colors
This one is fun. You may map issue status names to individual IRC colors
by setting status_colors to a hashref containing the map. The following
colors are understood:
* bold
* white
* black
* blue
* green
* red
<: $assignee :>
The getComponents method, which returns a list of components, may be
accessed using similar perl/xslate idioms:
<: $components.0 :>
The default inquiry format is:
<: colorize($issue) :> [<: $version :>] <: bold($summary) :> for <: $assignee :>
which produces replies such as:
<purl> PRJ-284 [Unscheduled] add jira to bot for diz
The default status format is:
<: $issue :> [<: $version :>] was <: $status_verb :> by <: $status_last_changed_user :> on <: $status_last_changed_datetime.strftime("%Y %b %d (%a) at %l:%M %P") :>
which produces replies such as:
lib/Bot/BasicBot/Pluggable/Module/JIRA.pm view on Meta::CPAN
default to "changed to".
=head2 status_colors
This one is fun. You may map issue status names to individual IRC
colors by setting status_colors to a hashref containing the map. The
following colors are understood:
=over 2
=item * bold
=item * white
=item * black
=item * blue
=item * green
=item * red
lib/Bot/BasicBot/Pluggable/Module/JIRA.pm view on Meta::CPAN
<: $assignee :>
The getComponents method, which returns a list of components, may be
accessed using similar perl/xslate idioms:
<: $components.0 :>
The default inquiry format is:
<: colorize($issue) :> [<: $version :>] <: bold($summary) :> for <: $assignee :>
which produces replies such as:
<purl> PRJ-284 [Unscheduled] add jira to bot for diz
The default status format is:
<: $issue :> [<: $version :>] was <: $status_verb :> by <: $status_last_changed_user :> on <: $status_last_changed_datetime.strftime("%Y %b %d (%a) at %l:%M %P") :>
which produces replies such as:
lib/Bot/BasicBot/Pluggable/Module/JIRA.pm view on Meta::CPAN
lazy => 1,
default => sub { [] },
handles => { add_handler => 'push' };
sub _build_xslate
{
my $self = shift;
my $colorizers =
{
bold => sub { "$_[0]" },
white => sub { "0$_[0]" },
black => sub { "1$_[0]" },
blue => sub { "2$_[0]" },
green => sub { "3$_[0]" },
red => sub { "4$_[0]" },
brown => sub { "5$_[0]" },
purple => sub { "6$_[0]" },
orange => sub { "7$_[0]" },
yellow => sub { "8$_[0]" },
light_green => sub { "9$_[0]" },
lib/Bot/BasicBot/Pluggable/Module/JIRA.pm view on Meta::CPAN
sub _build_formats
{
my $self = shift;
my $formats = $self->store->get(JIRA => 'formats');
$formats = {} unless ref($formats) eq 'HASH';
return
{
default => '<: colorize($issue) :> [<: $version :>] <: bold($summary) :> for <: $assignee :>',
status => '<: $issue :> [<: $version :>] was <: $status_verb :> by <: $status_last_changed_user :> on <: $status_last_changed_datetime.strftime("%Y %b %d (%a) at %l:%M %P") :>',
%$formats
#my $date = $dt->strftime('%Y %b %d (%a)');
#my $time = $dt->strftime('%l:%M %P');
}
}
sub _build_regex
{
my $self = shift;
( run in 1.306 second using v1.01-cache-2.11-cpan-39bf76dae61 )