App-GHPT

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN

You can alternatively provide your username via the `PIVOTALTRACKER_USERNAME`
environment variable and your token via the `PIVOTALTRACKER_TOKEN` environment
variable.

# CREATING PULL REQUEST QUESTIONS

A question is a class which consumes the
[App::GHPT::WorkSubmitter::Role::Question](https://metacpan.org/pod/App%3A%3AGHPT%3A%3AWorkSubmitter%3A%3ARole%3A%3AQuestion) and implements a method named
`ask`. See that role's documentation for details.

By default, this tool looks for modules that have a package name beginning
with `App::GHPT::WorkSubmitter::Question` to find question classes. However,
you can configure one or more alternative namespaces by setting the
`APP_GHPT_QUESTION_NAMESPACES` environment variable or the
`submit-work.question-namespaces` Git config key. This should be a
space-separated list of namespaces under which questions can live.

# REQUESTER NAME IN PULL REQUESTS

By default, the name of the PT story's requester will be included in the pull
request text. This is helpful if you relay your project's PRs to Slack, as the

lib/App/GHPT.pm  view on Meta::CPAN

You can alternatively provide your username via the C<PIVOTALTRACKER_USERNAME>
environment variable and your token via the C<PIVOTALTRACKER_TOKEN> environment
variable.

=head1 CREATING PULL REQUEST QUESTIONS

A question is a class which consumes the
L<App::GHPT::WorkSubmitter::Role::Question> and implements a method named
C<ask>. See that role's documentation for details.

By default, this tool looks for modules that have a package name beginning
with C<App::GHPT::WorkSubmitter::Question> to find question classes. However,
you can configure one or more alternative namespaces by setting the
C<APP_GHPT_QUESTION_NAMESPACES> environment variable or the
C<submit-work.question-namespaces> Git config key. This should be a
space-separated list of namespaces under which questions can live.

=head1 REQUESTER NAME IN PULL REQUESTS

By default, the name of the PT story's requester will be included in the pull
request text. This is helpful if you relay your project's PRs to Slack, as the

t/lib/TestFor/App/GHPT/WorkSubmitter/AskPullRequestQuestions.pm  view on Meta::CPAN

    local @INC = ( @INC, 't/lib' );

    my $ask = App::GHPT::WorkSubmitter::AskPullRequestQuestions->new(
        merge_to_branch_name => 'main',
        question_namespaces  => ['Helper::QuestionNamespace1'],
    );

    is_deeply(
        [ sort map { ref($_) } $ask->_questions->@* ],
        ['Helper::QuestionNamespace1::Question'],
        'asker only looks in namespace it is given'
    );

    $ask = App::GHPT::WorkSubmitter::AskPullRequestQuestions->new(
        merge_to_branch_name => 'main',
        question_namespaces  =>
            [ 'Helper::QuestionNamespace1', 'Helper::QuestionNamespace2' ],
    );

    is_deeply(
        [ sort map { ref($_) } $ask->_questions->@* ],



( run in 0.419 second using v1.01-cache-2.11-cpan-64827b87656 )