diff --git a/components/actions/constants/constants.json b/components/actions/constants/constants.json new file mode 100644 index 0000000..9f25638 --- /dev/null +++ b/components/actions/constants/constants.json @@ -0,0 +1,17 @@ +{ + "Outreachy":{ + "status":false, + "activeStatement":"You clicked *Outreachy*\nThe Outreachy Application period is currently going on. Reach out to https://www.outreachy.org/ for more details.", + "notActiveStatement":"You clicked *Outreachy*\nThe Outreachy Application period has ended for our participation in this program this year. You can still join the CHAOSS community in any of the ways found on our Participate page here: https://chaoss.community/participate." + }, + "GSoC":{ + "status":false, + "activeStatement":"You clicked *Google Summer of Code*\nThe Google Summer of Code Application period is currently going on. Reach out to https://summerofcode.withgoogle.com/ for more details.", + "notActiveStatement":"You clicked *Google Summer of Code*\nThe Google Summer of Code Application period has ended for our participation in this program this year. You can still join the CHAOSS community in any of the ways found on our Participate page here: https://chaoss.community/participate." + }, + "GSoD":{ + "status":false, + "activeStatement":"You clicked *Google Season of Docs*\nWelcome! If you haven’t yet, please join the <#C03C239HN1F> Slack channel and take note of the pinned item at the top of the channel for more information about next steps.", + "notActiveStatement":"You clicked *Google Season of Docs*\nThe Google Season of Docs Application period has ended for our participation in this program this year. You can still join the CHAOSS community in any of the ways found on our Participate page here: https://chaoss.community/participate." + } +} \ No newline at end of file diff --git a/components/actions/mentorshipResponses.js b/components/actions/mentorshipResponses.js index f2b9ec8..3a13228 100644 --- a/components/actions/mentorshipResponses.js +++ b/components/actions/mentorshipResponses.js @@ -1,21 +1,23 @@ +const constantData = require('./constants/constants.json'); + async function outreachy(say) { + let responseString = constantData.Outreachy.status ? constantData.Outreachy.activeStatement : constantData.Outreachy.notActiveStatement; return await say( - `You clicked *Outreachy*\n - The Outreachy Application period has ended for our participation in this program this year. You can still join the CHAOSS community in any of the ways found on our Participate page here: https://chaoss.community/participate.` + responseString ); } async function gsoc(say) { + let responseString = constantData.GSoC.status ? constantData.GSoC.activeStatement : constantData.GSoC.notActiveStatement; return await say( - `You clicked *Google Summer of Code*\n - The Google Summer of Code Application period has ended for our participation in this program this year. You can still join the CHAOSS community in any of the ways found on our Participate page here: https://chaoss.community/participate.` + responseString ); } async function gsod(say) { + let responseString = constantData.GSoD.status ? constantData.GSoD.activeStatement : constantData.GSoD.notActiveStatement; return await say( - `You clicked *Google Season of Docs*\n - Welcome! If you haven’t yet, please join the <#C03C239HN1F> Slack channel and take note of the pinned item at the top of the channel for more information about next steps.` + responseString ); }