Param20h commited on
Commit
8f2df0f
·
unverified ·
1 Parent(s): c1445c9

ci: add GSSoC welcome workflow for issues and PRs

Browse files
Files changed (1) hide show
  1. .github/workflows/gssoc-welcome.yml +52 -0
.github/workflows/gssoc-welcome.yml ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: GSSoC Welcome & Triage
2
+
3
+ on:
4
+ issues:
5
+ types: [opened]
6
+ pull_request_target:
7
+ types: [opened]
8
+
9
+ permissions:
10
+ issues: write
11
+ pull-requests: write
12
+
13
+ jobs:
14
+ welcome:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - name: Welcome New Contributor
18
+ uses: actions/github-script@v7
19
+ with:
20
+ script: |
21
+ const creator = context.payload.sender.login;
22
+ // Prevent the bot from replying to itself if it ever opens issues/PRs
23
+ if (creator.includes('[bot]')) return;
24
+
25
+ if (context.eventName === 'issues') {
26
+ const issueBody = `Hi @${creator}! 👋\n\nThanks for opening this issue! We are thrilled to have you contribute to **PDF-Assistant-RAG** for **GSSoC 2026**.\n\n📌 **Before you start:**\n- Make sure you have read our [Contributing Guidelines](https://github.com/${context.repo.owner}/${context.repo.repo}/blob/dev/CONTRIBUTING.md).\n- Wait for a project admin to assign this issue to you before working on it.\n- Remember to branch off \`dev\` and not \`main\`.\n\nHappy Coding! 🚀`;
27
+
28
+ await github.rest.issues.createComment({
29
+ issue_number: context.issue.number,
30
+ owner: context.repo.owner,
31
+ repo: context.repo.repo,
32
+ body: issueBody
33
+ });
34
+
35
+ // Automatically label all new issues with 'gssoc'
36
+ await github.rest.issues.addLabels({
37
+ issue_number: context.issue.number,
38
+ owner: context.repo.owner,
39
+ repo: context.repo.repo,
40
+ labels: ['gssoc']
41
+ });
42
+
43
+ } else if (context.eventName === 'pull_request') {
44
+ const prBody = `Hi @${creator}! 🎉\n\nThank you for submitting this Pull Request to **PDF-Assistant-RAG** for **GSSoC 2026**!\n\nA project admin or mentor will review your code shortly. Please make sure your PR description clearly explains the changes and references the issue number it fixes (e.g., \`Closes #123\`).\n\n🎯 **GSSoC Points Reminder:** Points will be awarded based on labels (\`difficulty\`, \`quality\`, and \`type\`) applied by the reviewers **after** the PR is successfully merged.\n\nKeep up the great work!`;
45
+
46
+ await github.rest.issues.createComment({
47
+ issue_number: context.issue.number,
48
+ owner: context.repo.owner,
49
+ repo: context.repo.repo,
50
+ body: prBody
51
+ });
52
+ }