Skip to content

feat: auto-label PRs and issues + sync all repo labels#6

Merged
jaseel0 merged 2 commits intomainfrom
copilot/add-auto-label-for-pr-and-issue
Mar 10, 2026
Merged

feat: auto-label PRs and issues + sync all repo labels#6
jaseel0 merged 2 commits intomainfrom
copilot/add-auto-label-for-pr-and-issue

Conversation

Copy link
Contributor

Copilot AI commented Mar 10, 2026

Adds automated labeling for PRs (file-path-based) and issues (keyword-based), plus a label definition file and sync workflow to keep repository labels in sync.

Labels (labels.yml)

30+ labels across 7 groups:

  • Status: needs-review, in-progress, approved, needs-changes, blocked
  • Type: bug, enhancement, feature, documentation, question, discussion
  • Challenge: challenge, submission, week-1week-4
  • Difficulty: beginner, intermediate, advanced
  • Contribution: good first issue, help wanted, hacktoberfest
  • Resolution: duplicate, invalid, wontfix
  • Area: leaderboard, ci/cd, dependencies

PR auto-labeling (labeler.yml + auto-label.ymllabel-pr job)

Uses actions/labeler@v5 to map changed file paths to labels on every PR open/sync/reopen:

week-2:
  - changed-files:
    - any-glob-to-any-file:
      - "challenges/week-2/**"
      - "challenges/week-2.md"

Issue auto-labeling (auto-label.ymllabel-issue job)

GitHub Script scans issue title + body for keywords and calls addLabels (non-destructive — preserves manually applied labels):

if (/\bbug\b|error|crash|broken|not working/.test(text)) add('bug');
const weekMatch = text.match(/\bweek[-\s]?(\d+)\b/);
if (weekMatch) add(`week-${weekMatch[1]}`);

Label sync (label-sync.yml)

EndBug/label-sync@v2 runs on changes to labels.yml (or workflow_dispatch) to create/update repo labels from the definition file without deleting unrecognized ones.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: jaseel0 <225665919+jaseel0@users.noreply.github.com>
@jaseel0 jaseel0 requested a review from naheel0 March 10, 2026 11:14
Copilot AI changed the title [WIP] Add auto-labeling functionality for pull requests and issues feat: auto-label PRs and issues + sync all repo labels Mar 10, 2026
@naheel0 naheel0 marked this pull request as ready for review March 10, 2026 11:16
@github-actions github-actions bot added the ci/cd Related to CI/CD workflows and automation label Mar 10, 2026
@jaseel0 jaseel0 merged commit 2413e02 into main Mar 10, 2026
2 checks passed
@jaseel0 jaseel0 deleted the copilot/add-auto-label-for-pr-and-issue branch March 10, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd Related to CI/CD workflows and automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants