Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the Newbie Advice Button #126

Merged
merged 21 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .env.example

This file was deleted.

8 changes: 7 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ app.action("faqs", async ({ ack, say }) => {
await ack();
theActions.faqs(say);
});


app.action("newbie_advice", async({ack, say}) => {
await ack();
theActions.newbie_advice(say);
})
//****************************************** */

// When a user joins the team, the bot sends a DM to the newcommer asking them how they would like to contribute
Expand All @@ -129,7 +135,7 @@ app.message(/outreachy/i, async ({ message, say, logger }) => {
// Sends CHAOSS Meeting Notes Link
const meetingNotesLink = process.env.MEETING_NOTES_LINK;

app.message(/(meeting|meeting notes)/i, async ({ message, say }) => {
app.message(/(!meeting|!notes)/i, async ({ message, say }) => {
if (!meetingNotesLink) {
await say("The meeting notes link is currently unavailable.");
} else {
Expand Down
9 changes: 9 additions & 0 deletions components/actions/actionResponses.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ async function faqs(say) {
);
}

async function newbie_advice(say) {
return await say(
`You clicked *New to Open Source ? Get Advice* \n
Welcome to the CHAOSS Community! Starting your journey in open source can be exciting and rewarding. To help you get started, we have a detailed guide just for newcomers. You can find it here:\n <https://github.com/chaoss/community/blob/main/advice_to_newcomers.md>. \n
This guide provides tips, best practices, and encouragement to help you make meaningful contributions. Remember, every contribution, big or small, matters. We're here to support you every step of the way! 🎉`
);
}

module.exports = {
develop,
joinMeet,
Expand All @@ -98,4 +106,5 @@ module.exports = {
regional_chapters,
learn_something_else,
faqs,
newbie_advice
};
18 changes: 17 additions & 1 deletion components/joinTeam.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,25 @@ async function joinTeamSlack(event, client, logger) {
type: 'section',
text: {
type: 'mrkdwn',
text: `Welcome to *CHAOSS Community* <@${event.user.id}>! 🎉How would you like to get started? \n\nI want to..`,
text: `Welcome to *CHAOSS Community* <@${event.user.id}>! 🎉 How would you like to get started?`,
},
},
{
type: 'actions',
elements: [
{
type: 'button',
text: {
type: 'plain_text',
text: 'New to Open Source? Get Advice',
emoji: true,
},
style: 'primary',
value: 'newbie_advice',
action_id: 'newbie_advice'
},
],
},
{
type: 'actions',
elements: [
Expand Down
18 changes: 17 additions & 1 deletion components/newbie.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,25 @@ async function newHere(message, client, logger) {
type: 'section',
text: {
type: 'mrkdwn',
text: `Welcome to *CHAOSS Community* <@${message.user}>! 🎉How would you like to get started? \n\nI want to..`,
text: `Welcome to *CHAOSS Community* <@${message.user}>! 🎉 How would you like to get started?`,
},
},
{
type: 'actions',
elements: [
{
type: 'button',
text: {
type: 'plain_text',
text: 'New to Open Source? Get Advice',
emoji: true,
},
style: 'primary',
value: 'newbie_advice',
action_id: 'newbie_advice'
},
],
},
{
type: 'actions',
elements: [
Expand Down
Loading