From b1469ec94357e676115ea96e8ee2ea26f6f19258 Mon Sep 17 00:00:00 2001 From: e11sy <130844513+e11sy@users.noreply.github.com> Date: Thu, 10 Apr 2025 19:16:25 +0300 Subject: [PATCH 1/3] Update index.js --- src/index.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/index.js b/src/index.js index 63a375d..21f999a 100644 --- a/src/index.js +++ b/src/index.js @@ -41,6 +41,7 @@ const PR_TIME = config.pr_time; * At 21:00 on every day-of-week from Monday through Friday. */ const MEETING_TIME = config.meeting_time; +const MEETING_NOTICE_TIME = config.meeting_notice_time; const octokit = new Octokit({ auth: TOKEN }); const MEMBERS_QUERY = require('./queries/members'); @@ -388,6 +389,24 @@ function parseMeetingMessage(mentionList) { * Call the Github GraphQL API, parse its response to message and add that message as cron job. */ async function main() { + if (MEETING_NOTICE_TIME) { + const meetingNoticeJob = new CronJob( + MEETING_NOTICE_TIME, + () => { + notify(`Meeting will start in 15 minutes🕒`) + .then(() => console.log('MeetingNotice Job Completed')) + .catch(HawkCatcher.send); + }, + null, + true, + 'Europe/Moskow' + ); + + meetingNoticeJob.start(); + console.log('MeetingNotice notifier started'); + console.log('Will notify at:' + MEETING_NOTICE_TIME); + } + if (MEETING_TIME) { const meetingJob = new CronJob( MEETING_TIME, From 0f99b4a60bc86ef998955da0ebc85bb3cdcbd8df Mon Sep 17 00:00:00 2001 From: e11sy <130844513+e11sy@users.noreply.github.com> Date: Thu, 10 Apr 2025 19:18:50 +0300 Subject: [PATCH 2/3] Update config.example.yml --- config.example.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/config.example.yml b/config.example.yml index 607d22b..3d47cbb 100644 --- a/config.example.yml +++ b/config.example.yml @@ -49,6 +49,7 @@ notifier_url: to_do_time: 0 9,18 * * 1-5 pr_time: 0 9,18 * * 1-5 meeting_time: 0 9,18 * * 1-5 +meeting_notice_time: 45 8,17 * * 1-5 # List of people (Telegram only) to tag in the «Meeting Message» message meeting_mention: From 712ca5c3e61d2ff464bb963c6a591227efe21199 Mon Sep 17 00:00:00 2001 From: e11sy <130844513+e11sy@users.noreply.github.com> Date: Thu, 10 Apr 2025 19:19:52 +0300 Subject: [PATCH 3/3] Update src/index.js Co-authored-by: Peter --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 21f999a..268eafb 100644 --- a/src/index.js +++ b/src/index.js @@ -393,7 +393,7 @@ async function main() { const meetingNoticeJob = new CronJob( MEETING_NOTICE_TIME, () => { - notify(`Meeting will start in 15 minutes🕒`) + notify(`Meeting will start in 15 minutes 🕒`) .then(() => console.log('MeetingNotice Job Completed')) .catch(HawkCatcher.send); },