Skip to content

[Feature] Setup Automatic Pull Request Labeling Based on Changed Files #64

@kunalverma2512

Description

@kunalverma2512

Description

Currently, Pull Requests in the repository require labels to be assigned manually by maintainers. As contributor activity increases, manually managing labels for every PR becomes repetitive and inefficient.

To improve repository organization and contribution workflow, we need to introduce automatic Pull Request labeling using GitHub Actions.

The system should automatically assign labels based on the files or directories modified within a Pull Request.

This will help:

  • Improve PR categorization
  • Simplify repository triaging
  • Reduce manual maintainer workload
  • Improve contribution management as repository activity grows

Requirements

Create the following configuration file:

.github/labeler.yml

Automatic Pull Request Labeling Setup

  • Example structure:

    frontend:
      - "frontend/**"
    
    backend:
      - "backend/**"
    
    docs:
      - "**/*.md"
  • Additionally, configure a GitHub Actions workflow to automatically apply labels during Pull Request events.

  • The workflow should:

    • Detect changed files in Pull Requests.
    • Automatically apply matching labels.
    • Support scalable future label additions.

Expected Outcome

After implementation:

  • Pull Requests modifying frontend files should automatically receive the frontend label.
  • Pull Requests modifying backend files should automatically receive the backend label.
  • Documentation-related Pull Requests should automatically receive the docs label.
  • Maintainers should spend less time manually categorizing Pull Requests.
  • Repository workflow and PR management should become more organized and scalable.

Additional Notes

  • The implementation should strictly focus on automatic Pull Request labeling setup only.
  • Required labels should already exist in the repository before testing the workflow.
  • No unrelated repository modifications should be included in the PR.

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions