Skip to content

Conversation

@AyushKhatri-Dev
Copy link

This PR adds a GitHub Actions workflow for automatic labeling using a labeler.yml file. It automatically applies labels to new issues and pull requests based on predefined rules.

Changes Made

Added .github/workflows/labeler.yml to enable GitHub Actions for automatic labeling.
Configured the labeler.yml file to label issues and pull requests based on file paths or keywords.

Linked Issue

Fixes #3653

#3653 Testing

Tested the workflow locally using the GitHub Actions sandbox.
After creating this PR, the workflow should automatically apply labels if the rules are matched.

Checklist

-I have followed the project’s code of conduct.
-I have tested this workflow.
-I have ensured that the labels match the repository's structure.

@walterbender
Copy link
Member

Can you please clarify how this will change the workflow for creating a ticket or PR? What labels and why those labels?

@AyushKhatri-Dev
Copy link
Author

AyushKhatri-Dev commented Dec 21, 2024

Sorry, earlier i did some mistake but i have corrected the code you can check

labeler.yml

This file configures GitHub's labeler action.

It automatically applies labels to pull requests and issues based on the file paths or types changed.

Label for issues or pull requests involving Python files or files in the 'src/bugs/' directory.

bug:

  • "**/*.py" # Matches all Python files.
  • "src/bugs/**" # Matches all files in the 'src/bugs/' directory.

Label for issues or pull requests involving JavaScript files or files in the 'src/features/' directory.

feature:

  • "**/*.js" # Matches all JavaScript files.
  • "src/features/**" # Matches all files in the 'src/features/' directory.

Label for documentation updates, including Markdown files or any files in the 'docs/' directory.

documentation:

  • "**/*.md" # Matches all Markdown files.
  • "docs/**" # Matches all files in the 'docs/' directory.

@walterbender
Copy link
Member

I am still not clear on how this will work. We don't have a bugs or features directory.

@AyushKhatri-Dev
Copy link
Author

I’ve updated the labeler configuration to align with the actual structure of the repository. Previously, the configuration included directories like src/bugs and src/features which don't exist in the repo. I’ve removed those paths and simplified the patterns to match the current folder structure, such as:

Matching all Python files globally (/*.py)
Handling documentation files in documentation/
and docs/** folders
The changes ensure that the labeler will work properly without errors. Please review the updated .github/labeler.yml and .github/workflows/labeler.yml files. Let me know if further adjustments are needed.

Thanks! 😊

@walterbender
Copy link
Member

I am still confused. What .py files? why Python --> bugs and JS --> features?

@github-actions
Copy link
Contributor

This pull request has been open for more than 60 days without any activity. It will be closed in 3 days unless the stale label is removed or commented on.

@github-actions github-actions bot added the Stale label Feb 21, 2025
@github-actions
Copy link
Contributor

Closed pull request due to inactivity for more than 63 days.

@github-actions github-actions bot closed this Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] Add Labeler to Enable Automatic Labeling

2 participants