From cb3e6181b09112bf0c4ddf898fa22068b9306188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Diamond?= <32074058+Andre-Diamond@users.noreply.github.com> Date: Wed, 8 May 2024 05:58:22 +0200 Subject: [PATCH] feat: Add 'Ethics Workgroup' to Discord webhook URLs Update the 'pages/api/discord.ts' file to include the 'Ethics Workgroup' in the Discord webhook URLs. This allows messages to be sent to the 'Ethics Workgroup' channel. Also, update the 'pages/submit-meeting-summary/index.tsx' file to include the 'Ethics Workgroup' in the meeting summary submission form. This ensures that the 'Ethics Workgroup' can submit meeting summaries with the required fields. Lastly, update the 'utils/updateWorkgroups.js' file to add a new property 'canceledSummary' to the 'preferred_template' object. This property will be used to track if a meeting summary has been canceled. This commit adds support for the 'Ethics Workgroup' in the Discord integration and meeting summary submission process. --- pages/api/discord.ts | 3 ++- pages/submit-meeting-summary/index.tsx | 3 ++- utils/updateWorkgroups.js | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pages/api/discord.ts b/pages/api/discord.ts index bf0be7b..561793d 100644 --- a/pages/api/discord.ts +++ b/pages/api/discord.ts @@ -25,7 +25,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) 'Research and Development Guild': process.env.SNET_DISCORD_WEBHOOK_URL, 'Ambassador Town Hall': process.env.SNET_DISCORD_WEBHOOK_URL, 'Deep Funding Town Hall': process.env.SNET_DISCORD_WEBHOOK_URL, - 'One-off Event': process.env.SNET_DISCORD_WEBHOOK_URL + 'One-off Event': process.env.SNET_DISCORD_WEBHOOK_URL, + 'Ethics Workgroup': process.env.SNET_DISCORD_WEBHOOK_URL }; diff --git a/pages/submit-meeting-summary/index.tsx b/pages/submit-meeting-summary/index.tsx index 0d03cff..a79de85 100644 --- a/pages/submit-meeting-summary/index.tsx +++ b/pages/submit-meeting-summary/index.tsx @@ -86,7 +86,8 @@ const SubmitMeetingSummary: NextPage = () => { "Marketing Guild": ["discussionPoints", "decisionItems", "actionItems"], "Ambassador Town Hall": ["townHallSummary"], "Deep Funding Town Hall": ["townHallSummary"], - "One-off Event": ["Narative"] + "One-off Event": ["Narative"], + "Ethics Workgroup": ["narrative", "decisionItems", "actionItems"] }; useEffect(() => { diff --git a/utils/updateWorkgroups.js b/utils/updateWorkgroups.js index 0752595..80d7319 100644 --- a/utils/updateWorkgroups.js +++ b/utils/updateWorkgroups.js @@ -41,7 +41,8 @@ export async function updateWorkgroups(workgroupData) { ], "tags":1, "type":"Custom", - "noSummaryGiven": false + "noSummaryGiven": false, + "canceledSummary": false } let updates = {...workgroupData, preferred_template}