Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/challenge-submission.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Challenge Submission
description: Submit your solution for a weekly challenge.
title: "[Week X] Challenge Submission - YOUR_USERNAME"
labels: challenge, submission
assignees: ''

---

## Challenge Information

- **Week:** [e.g., Week 1]
- **Challenge Name:** [Name of the challenge]

## PR Link
- Please link your Pull Request for this challenge: [PR link]

## Notes / Comments
- Any comments about your submission, difficulties, or questions.
49 changes: 49 additions & 0 deletions .github/workflows/auto-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "Auto Label Issues & PRs"

on:
issues:
types: [opened]
pull_request:
types: [opened]

jobs:
labeler:
runs-on: ubuntu-latest

steps:
- name: "Add Labels Automatically"
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const issue = context.payload.issue || context.payload.pull_request;
if (!issue) return;

const labelsToAdd = [];

// Auto-label PRs as challenge submissions if they include week-X in title
if (issue.title.match(/week-\d+/i)) {
labelsToAdd.push("challenge");
}

// Auto-label issues that include "question"
if (issue.title.toLowerCase().includes("question")) {
labelsToAdd.push("question");
}

// Auto-label issues that include "bug"
if (issue.title.toLowerCase().includes("bug")) {
labelsToAdd.push("bug");
}

if (labelsToAdd.length > 0) {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
labels: labelsToAdd,
});
console.log("Labels added:", labelsToAdd.join(", "));
} else {
console.log("No labels added for this issue/PR.");
}