.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "App::Yath::Plugin::Notify 3pm" .TH App::Yath::Plugin::Notify 3pm "2023-03-12" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" App::Yath::Plugin::Notify \- Plugin to send email and/or slack notifications .SH "DESCRIPTION" .IX Header "DESCRIPTION" This plugin is used for sending email and/or slack notifications from yath. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .SS "\s-1IN A TEST\s0" .IX Subsection "IN A TEST" .Vb 5 \& #!/usr/bin/perl \& use Test2::V0; \& # HARNESS\-META owner author@example.com \& # HARNESS\-META slack #slack_channel \& # HARNESS\-META slack #slack_user .Ve .PP You can use the \f(CW\*(C`# HARNESS\-META owner EMAIL_ADDRESS\*(C'\fR to specify an \*(L"owner\*(R" email address. You can use the \f(CW\*(C`# HARNESS\-META slack USER/CHANNEL\*(C'\fR to specify a slack user or channel that owns the test. .SS "\s-1RUNNING WITH NOTIFICATIONS ENABLED\s0" .IX Subsection "RUNNING WITH NOTIFICATIONS ENABLED" .Vb 1 \& $ yath test \-pNotify ... .Ve .PP 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 \f(CW\*(C`\-\-no\-scan\-plugins\*(C'\fR was not specified. .PP \fI\s-1EMAIL\s0\fR .IX Subsection "EMAIL" .PP .Vb 1 \& $ yath test \-\-notify\-email\-owner \-\-notify\-email\-from user@example.com \-\-notify\-email\-fail fixer@example.com .Ve .PP \fI\s-1SLACK\s0\fR .IX Subsection "SLACK" .PP A slack hooks url is always needed for slack to work. .PP .Vb 1 \& $ yath test \-\-notify\-slack\-url https://hooks.slack.com/... \-\-notify\-slack\-fail \*(Aq#foo\*(Aq \-\-notify\-slack\-owner .Ve .SH "PROVIDED OPTIONS" .IX Header "PROVIDED OPTIONS" .SS "\s-1COMMAND OPTIONS\s0" .IX Subsection "COMMAND OPTIONS" \fINotification Options\fR .IX Subsection "Notification Options" .IP "\-\-notify\-email foo@example.com" 4 .IX Item "--notify-email foo@example.com" .PD 0 .IP "\-\-no\-notify\-email" 4 .IX Item "--no-notify-email" .PD Email the test results to the specified email address(es) .Sp Can be specified multiple times .IP "\-\-notify\-email\-fail foo@example.com" 4 .IX Item "--notify-email-fail foo@example.com" .PD 0 .IP "\-\-no\-notify\-email\-fail" 4 .IX Item "--no-notify-email-fail" .PD Email failing results to the specified email address(es) .Sp Can be specified multiple times .IP "\-\-notify\-email\-from foo@example.com" 4 .IX Item "--notify-email-from foo@example.com" .PD 0 .IP "\-\-no\-notify\-email\-from" 4 .IX Item "--no-notify-email-from" .PD If any email is sent, this is who it will be from .IP "\-\-notify\-email\-owner" 4 .IX Item "--notify-email-owner" .PD 0 .IP "\-\-no\-notify\-email\-owner" 4 .IX Item "--no-notify-email-owner" .PD 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 .IP "\-\-notify\-no\-batch\-email" 4 .IX Item "--notify-no-batch-email" .PD 0 .IP "\-\-no\-notify\-no\-batch\-email" 4 .IX Item "--no-notify-no-batch-email" .PD Usually owner failures are sent as a single batch at the end of testing. Toggle this to send failures as they happen. .IP "\-\-notify\-no\-batch\-slack" 4 .IX Item "--notify-no-batch-slack" .PD 0 .IP "\-\-no\-notify\-no\-batch\-slack" 4 .IX Item "--no-notify-no-batch-slack" .PD Usually owner failures are sent as a single batch at the end of testing. Toggle this to send failures as they happen. .IP "\-\-notify\-slack '#foo'" 4 .IX Item "--notify-slack '#foo'" .PD 0 .IP "\-\-notify\-slack '@bar'" 4 .IX Item "--notify-slack '@bar'" .IP "\-\-no\-notify\-slack" 4 .IX Item "--no-notify-slack" .PD Send results to a slack channel and/or user .Sp Can be specified multiple times .IP "\-\-notify\-slack\-fail '#foo'" 4 .IX Item "--notify-slack-fail '#foo'" .PD 0 .IP "\-\-notify\-slack\-fail '@bar'" 4 .IX Item "--notify-slack-fail '@bar'" .IP "\-\-no\-notify\-slack\-fail" 4 .IX Item "--no-notify-slack-fail" .PD Send failing results to a slack channel and/or user .Sp Can be specified multiple times .IP "\-\-notify\-slack\-owner" 4 .IX Item "--notify-slack-owner" .PD 0 .IP "\-\-no\-notify\-slack\-owner" 4 .IX Item "--no-notify-slack-owner" .PD Send slack notifications to the slack channels/users listed in test meta-data when tests fail. .IP "\-\-notify\-slack\-url https://hooks.slack.com/..." 4 .IX Item "--notify-slack-url https://hooks.slack.com/..." .PD 0 .IP "\-\-no\-notify\-slack\-url" 4 .IX Item "--no-notify-slack-url" .PD Specify an \s-1API\s0 endpoint for slack webhook integrations .IP "\-\-notify\-text \s-1ARG\s0" 4 .IX Item "--notify-text ARG" .PD 0 .IP "\-\-notify\-text=ARG" 4 .IX Item "--notify-text=ARG" .IP "\-\-message \s-1ARG\s0" 4 .IX Item "--message ARG" .IP "\-\-message=ARG" 4 .IX Item "--message=ARG" .IP "\-\-msg \s-1ARG\s0" 4 .IX Item "--msg ARG" .IP "\-\-msg=ARG" 4 .IX Item "--msg=ARG" .IP "\-\-no\-notify\-text" 4 .IX Item "--no-notify-text" .PD Add a custom text snippet to email/slack notifications .IP "\-\-notify\-text\-module \s-1ARG\s0" 4 .IX Item "--notify-text-module ARG" .PD 0 .IP "\-\-notify\-text\-module=ARG" 4 .IX Item "--notify-text-module=ARG" .IP "\-\-message_module \s-1ARG\s0" 4 .IX Item "--message_module ARG" .IP "\-\-message_module=ARG" 4 .IX Item "--message_module=ARG" .IP "\-\-no\-notify\-text\-module" 4 .IX Item "--no-notify-text-module" .PD Use the specified module to generate messages for emails and/or slack. .SH "SOURCE" .IX Header "SOURCE" The source code repository for Test2\-Harness can be found at \&\fIhttp://github.com/Test\-More/Test2\-Harness/\fR. .SH "MAINTAINERS" .IX Header "MAINTAINERS" .IP "Chad Granum " 4 .IX Item "Chad Granum " .SH "AUTHORS" .IX Header "AUTHORS" .PD 0 .IP "Chad Granum " 4 .IX Item "Chad Granum " .PD .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright 2020 Chad Granum . .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .PP See \fIhttp://dev.perl.org/licenses/\fR