-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
62bfc9f
commit 31c6fbf
Showing
3 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
node_modules/ | ||
ROFIES-GitHub.json | ||
get-people/avatar_urls.txt | ||
Contact Information ROFIES - Form Responses 1.csv | ||
Contact Information ROFIES - Form Responses 1.csv | ||
.vercel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const express = require('express'); | ||
const bodyParser = require('body-parser'); | ||
const app = express(); | ||
const PORT = process.env.PORT || 3000; | ||
|
||
app.use(bodyParser.json()); | ||
|
||
app.post('/webhook', (req, res) => { | ||
const event = req.headers['x-github-event']; | ||
const payload = req.body; | ||
|
||
if (event === 'membership' && payload.action === 'added') { | ||
const member = payload.member.login; | ||
console.log(`🎉 Hello, @${member}! Welcome to ROFIES-IIITP GitHub organization!`); | ||
console.log("🤖 We're thrilled to have you on board."); | ||
console.log("🚀 Feel free to explore our projects and contribute your ideas."); | ||
console.log("🌟 If you have any questions or need assistance, don't hesitate to reach out!"); | ||
} | ||
|
||
res.status(200).send('Webhook received'); | ||
}); | ||
|
||
app.listen(PORT, () => { | ||
console.log(`Server is listening on port ${PORT}`); | ||
}); |