SVN::H...Notify(3pm)

πŸ“¦
version 1.36 Β· 3 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

✨ NAME ✨

SVN::Hooks::Notify β€” bestie, it's Subversion activity notification πŸ’Œ (that's the whole name, we're just vibing with it, the manual page is SVN::H...Notify(3pm) if you're keeping track)


πŸŽ€ VERSION πŸŽ€

version 1.36 β€” yeah she's got a number and she's proud of it πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

So this SVN::Hooks plugin sends notification emails for Subversion repository activity. And when I say "sends notification emails" I mean it's literally just a simple wrapper around the SVN::Notify module β€” it's giving middle-management energy, it delegates and it slays 🫢

She's active in the post-commit hook. That's her shift. That's when she shows up. Periodt.

And she gets configured by the following directives:

🌸 NOTIFY_DEFAULTS(%HASH) 🌸

Okay so this directive is the one that lets you specify default arguments for the SVN::Notify constructor. Like, the baseline fit that everything else builds on ✨

NOTIFY_DEFAULTS(
    user_domain => 'cpqd.com.br',
    sendmail    => '/usr/sbin/sendmail',
    language    => 'pt_BR',
);
NOTIFY_DEFAULTS(smtp => 'smtp.cpqd.com.br');

And please, bestie, go see the SVN::Notify documentation to know about all the available options. I'm not gatekeeping, I'm just telling you where the full menu lives πŸ‘‘

πŸ’– NOTIFY(%HASH) πŸ’–

This directive merges the options received with the defaults obtained from NOTIFY_DEFAULTS and passes the result to the SVN::Notify constructor. Merge and pass. That's the whole plot 🎬

Not me pointing out that neither the repos_path nor the revision options need to be specified β€” they are grokked automatically. She just knows. Main character energy fr fr πŸ’€
NOTIFY(
    to        => 'commit-list@example.com',
    with_diff => 1,
);

NOTIFY(
    to_email_map => {
        '^trunk/produtos|^branches' => 'commit-list@example.com',
        '^conf' => 'admin@example.com',
    },
    subject_prefix => '[REPO] ',
    attach_diff  => 1,
);

Look at those to_email_map regex keys routing mail around like she's directing traffic at the function. Iconic. No cap. 🌈


πŸ‘‘ AUTHOR πŸ‘‘

Gustavo L. de M. Chaves <gnustavo@cpan.org> β€” the author, the legend, the one who made this happen 🫑


This software is copyright (c) 2022 by CPqD <www.cpqd.com.br>.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.


Okay so like, that's the whole page, you're fully caught up, go configure your hooks bestie 🧚

Signing off from perl v5.36.0, dated 2022-09-11, on the manual page SVN::H...Notify(3pm) β€” mwah, drink water, and remember to read the SVN::Notify docs for the full option list πŸ’–βœ¨

πŸ“¦ where this page comes from