Bot-BasicBot-Pluggable-Module-ReviewBoard
view release on metacpan or search on metacpan
lib/Bot/BasicBot/Pluggable/Module/ReviewBoard.pm view on Meta::CPAN
}
sub help {
return q{Matches rb followed by a number (e.g. rb1234) or an RB URL for a given rb (e.g. http://example.com/r/1234)
Variables:
* user_rb_url - Review Board URL
* user_field_not_set - This will replace the value when a field doesn't have a value in RB
* user_input_regexp - The regexp that messages will be tested against, must include at least one named closure called "rb" that match the RB number.
%RB_URL% will be replaced by the value from user_rb_url.
Default: rb (?:\#|\s)? (?<rb>\d+) | %RB_URL%/r/(?<rb>\d+)
* user_output_message - The formatted output message. Words between two percent signs (e.g. %BRANCH%) will replaced with the data from RB. The following fields are available:
RB_URL ID SUBMITTER GROUPS BRANCH BUGS_CLOSED SUMMARY TIME_ADDED LAST_UPDATED REPOSITORY DESCRIPTION PUBLIC PEOPLE TESTING_DONE.};
}
sub _get_rb_data {
my ($self, $rb) = @_;
$self->ua;
my $content = decode_json LWP::Simple::get( sprintf( "%s/api/review-requests/%d", $self->get('user_rb_url'), $rb ) );
my $review = $content->{review_request};
my $groups = join ", ", map { $_->{title} } @{ $review->{target_groups} };
my $people = join ", ", map { $_->{title} } @{ $review->{target_people} };
lib/Bot/BasicBot/Pluggable/Module/ReviewBoard.pm view on Meta::CPAN
Default: C<rb (?:\#|\s)? (?<rb>\d+) | %RB_URL%/r/(?<rb>\d+)>
=item user_field_not_set
This will replace the value when a field doesn't have a value in RB.
=item user_output_message
The formatted output message.
Tags between two percent signs (e.g. %BRANCH%) will replaced with
the data from RB. The following tags are available:
=over
=item RB_URL
Review Board URL set in user_rb_url.
=item ID
( run in 0.422 second using v1.01-cache-2.11-cpan-709fd43a63f )