diff --git a/data/common/common.yaml b/data/common/common.yaml --- a/data/common/common.yaml +++ b/data/common/common.yaml @@ -3130,6 +3130,12 @@ hour: 12 weekday: fri +monthly_report_bot::user: nobody +monthly_report_bot::cron: + minute: 0 + hour: 0 + day: 1 + swh::postgres::service::users: - root - zack diff --git a/site-modules/profile/files/weekly_report_bot/monthly-report-bot b/site-modules/profile/files/weekly_report_bot/monthly-report-bot new file mode 100755 --- /dev/null +++ b/site-modules/profile/files/weekly_report_bot/monthly-report-bot @@ -0,0 +1,23 @@ +#!/bin/bash + +DEST=swh-team@inria.fr + +/usr/lib/sendmail -t < +To: $DEST +Subject: [Monthly Roadmap Report] Month $(date +%G-%m) + +Beep boop, I'm a bot. + +This thread will contain reports from each Software Heritage team members +summarizing the progress roadmap items they are in charge of. +Please feel free to ask for more details, we'll be glad to +oblige! + +As a reminder, the current roadmap is available at: +https://docs.softwareheritage.org/devel/roadmap/roadmap-2021.html + +Yours faithfully, +-- +The Software Heritage monthly report bot +EOF diff --git a/site-modules/profile/manifests/monthly_report_bot.pp b/site-modules/profile/manifests/monthly_report_bot.pp new file mode 100644 --- /dev/null +++ b/site-modules/profile/manifests/monthly_report_bot.pp @@ -0,0 +1,22 @@ +# A bot creating a thread for people to send their monthly roadmap report + +class profile::monthly_report_bot { + $command = '/usr/local/bin/monthly-report-bot' + + $monthly_report_user = lookup('monthly_report_bot::user') + $monthly_report_cron = lookup('monthly_report_bot::cron') + + file {$command: + ensure => present, + mode => '0755', + owner => 'root', + group => 'root', + source => 'puppet:///modules/profile/monthly_report_bot/monthly-report-bot', + } + + profile::cron::d {'monthly-report-bot': + command => $command, + user => $monthly_report_user, + * => $monthly_report_cron, + } +}