Skip to content

Commit 62e90db

Browse files
Merge pull request #62 from PRODHOSH/gssoc26-templates
auto-label gssoc when included
2 parents 0640d57 + 911b2c0 commit 62e90db

5 files changed

Lines changed: 53 additions & 0 deletions

File tree

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,5 @@ body:
5454
required: true
5555
- label: "I want to work on this issue"
5656
required: false
57+
- label: "I am participating in GSSoC 2026"
58+
required: false

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,6 @@ body:
7373
required: true
7474
- label: "I want to work on this issue"
7575
required: false
76+
- label: "I am participating in GSSoC 2026"
77+
required: false
7678

.github/ISSUE_TEMPLATE/project_proposal.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,5 @@ body:
104104
required: true
105105
- label: "I want to work on this issue"
106106
required: false
107+
- label: "I am participating in GSSoC 2026"
108+
required: false

.github/pull_request_template.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,5 @@ body:
7575
required: false
7676
- label: "I have updated the README.md (if adding new project)"
7777
required: false
78+
- label: "I am participating in GSSoC 2026"
79+
required: false
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: GSSoC Labeler
2+
3+
on:
4+
issues:
5+
types: [opened, edited]
6+
pull_request_target:
7+
types: [opened, edited]
8+
9+
jobs:
10+
label_gssoc:
11+
runs-on: ubuntu-latest
12+
13+
permissions:
14+
issues: write
15+
pull-requests: write
16+
17+
steps:
18+
- name: Check and add GSSoC label
19+
uses: actions/github-script@v7
20+
with:
21+
script: |
22+
let bodyText = "";
23+
let issueNum = null;
24+
25+
if (context.payload.issue?.body) {
26+
bodyText = context.payload.issue.body;
27+
issueNum = context.payload.issue.number;
28+
}
29+
else if (context.payload.pull_request?.body) {
30+
bodyText = context.payload.pull_request.body;
31+
issueNum = context.payload.pull_request.number;
32+
}
33+
34+
const isGSSoC =
35+
bodyText.includes("[x] I am participating in GSSoC 2026") ||
36+
bodyText.includes("[X] I am participating in GSSoC 2026");
37+
38+
if (isGSSoC && issueNum) {
39+
await github.rest.issues.addLabels({
40+
owner: context.repo.owner,
41+
repo: context.repo.repo,
42+
issue_number: issueNum,
43+
labels: ["gssoc26"]
44+
});
45+
}

0 commit comments

Comments
 (0)