diff --git a/site-modules/profile/files/weekly_planning_bot/weekly-planning-bot b/site-modules/profile/files/weekly_planning_bot/weekly-planning-bot index 80ee3e35..4db35d1d 100644 --- a/site-modules/profile/files/weekly_planning_bot/weekly-planning-bot +++ b/site-modules/profile/files/weekly_planning_bot/weekly-planning-bot @@ -1,43 +1,43 @@ #!/usr/bin/env bash set -e DEST=swh-team@inria.fr AUTHOR=swh-team@inria.fr TEMPLATE_ID="6YKT5osoST-amJQ0MusH2Q" URL="https://hedgedoc.softwareheritage.org" DATE=`date +%G-W%V` # Retrieve the template's content TEMPLATE=`curl -s "${URL}/${TEMPLATE_ID}/download"` -TEMPLATE=$(echo "$TEMPLATE" | sed -e "s/\$DATE/$DATE/g") +TEMPLATE=$(echo "$TEMPLATE" | sed -e "s/\$DATE/$DATE/g" | sed -e "/^tags:/s/, template//") # Create a new page initialized with the template content RESP=`curl -s -A POST -H "Content-Type: text/markdown" "${URL}/new" --data-binary "$TEMPLATE"` LOCATION=`echo "$RESP" | awk '{print $4}'` if [ -n "$LOCATION" ] ; then /usr/lib/sendmail -t < To: $DEST Subject: [Weekly Planning] Week $DATE Beep boop, I'm a bot. Here is the pad for the next weekly planning meeting: $LOCATION Please take a few minutes to pre-fill your part. Remote attendees: https://meet.jit.si/EquivalentCoincidencesVentureOnlySwhTeam Yours faithfully, -- The Software Heritage weekly bot EOF fi