logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

App::Yath::Plugin::Notify - Plugin to send email and/or slack notifications

Authors

       Chad Granum <exodist@cpan.org>

Description

       This plugin is used for sending email and/or slack notifications from yath.

Maintainers

       Chad Granum <exodist@cpan.org>

Name

       App::Yath::Plugin::Notify - Plugin to send email and/or slack notifications

Provided Options

COMMANDOPTIONSNotificationOptions

       --notify-email foo@example.com
       --no-notify-email
           Email the test results to the specified email address(es)

           Can be specified multiple times

       --notify-email-fail foo@example.com
       --no-notify-email-fail
           Email failing results to the specified email address(es)

           Can be specified multiple times

       --notify-email-from foo@example.com
       --no-notify-email-from
           If any email is sent, this is who it will be from

       --notify-email-owner
       --no-notify-email-owner
           Email the owner of broken tests files upon failure. Add `# HARNESS-META-OWNER foo@example.com` to the
           top of a test file to give it an owner

       --notify-no-batch-email
       --no-notify-no-batch-email
           Usually owner failures are sent as a single batch at the end of testing. Toggle this to send failures
           as they happen.

       --notify-no-batch-slack
       --no-notify-no-batch-slack
           Usually owner failures are sent as a single batch at the end of testing. Toggle this to send failures
           as they happen.

       --notify-slack '#foo'
       --notify-slack '@bar'
       --no-notify-slack
           Send results to a slack channel and/or user

           Can be specified multiple times

       --notify-slack-fail '#foo'
       --notify-slack-fail '@bar'
       --no-notify-slack-fail
           Send failing results to a slack channel and/or user

           Can be specified multiple times

       --notify-slack-owner
       --no-notify-slack-owner
           Send slack notifications to the slack channels/users listed in test meta-data when tests fail.

       --notify-slack-url https://hooks.slack.com/...
       --no-notify-slack-url
           Specify an API endpoint for slack webhook integrations

       --notify-text ARG
       --notify-text=ARG
       --message ARG
       --message=ARG
       --msg ARG
       --msg=ARG
       --no-notify-text
           Add a custom text snippet to email/slack notifications

       --notify-text-module ARG
       --notify-text-module=ARG
       --message_module ARG
       --message_module=ARG
       --no-notify-text-module
           Use the specified module to generate messages for emails and/or slack.

Source

       The source code repository for Test2-Harness can be found at http://github.com/Test-More/Test2-Harness/.

Synopsis

INATEST
           #!/usr/bin/perl
           use Test2::V0;
           # HARNESS-META owner author@example.com
           # HARNESS-META slack #slack_channel
           # HARNESS-META slack #slack_user

       You can use the "# HARNESS-META owner EMAIL_ADDRESS" to specify an "owner" email address. You can use the
       "# HARNESS-META slack USER/CHANNEL" to specify a slack user or channel that owns the test.

   RUNNINGWITHNOTIFICATIONSENABLED
           $ yath test -pNotify ...

       Also of note, most of the time you can just specify the notification options you want and the plugin will
       load as needed as long as "--no-scan-plugins" was not specified.

       EMAIL

           $ yath test --notify-email-owner --notify-email-from user@example.com --notify-email-fail fixer@example.comSLACK

       A slack hooks url is always needed for slack to work.

           $ yath test --notify-slack-url https://hooks.slack.com/... --notify-slack-fail '#foo' --notify-slack-owner

See Also