Skip to content

Add CI tool for auto labelling the issue. #115

Merged
vatsalsinghkv merged 1 commit intovatsalsinghkv:mainfrom
adity1raut:Auto-lable
Oct 3, 2025
Merged

Add CI tool for auto labelling the issue. #115
vatsalsinghkv merged 1 commit intovatsalsinghkv:mainfrom
adity1raut:Auto-lable

Conversation

@adity1raut
Copy link
Contributor

Fixed #67

Signed-off-by: adity1raut <araut7798@gmail.com>
@vercel
Copy link

vercel bot commented Oct 2, 2025

@adity1raut is attempting to deploy a commit to the vatsalsinghkv's projects Team on Vercel.

A member of the Team first needs to authorize it.

@adity1raut
Copy link
Contributor Author

Auto-Labeling System Documentation

This repository includes an intelligent auto-labeling system that automatically applies relevant labels to issues based on their title and content.

🤖 How It Works

When an issue is opened or edited, the auto-labeling workflow:

  1. Analyzes the issue title and description
  2. Detects keywords and patterns using regex matching
  3. Applies relevant labels automatically
  4. Logs the labeling process for transparency

📋 Label Categories

Type Labels (Primary - First Match Wins)

  • bug - Issues related to bugs, errors, crashes, failures
  • enhancement - New features, additions, implementations
  • documentation - Documentation updates, guides, tutorials
  • refactoring - Code improvements, optimization, restructuring
  • testing - Test-related issues, specs, test cases

Priority Labels

  • priority: high - Urgent, critical, blocking issues
  • priority: low - Minor, trivial, nice-to-have issues

Difficulty Labels

  • good first issue - Beginner-friendly, easy, simple tasks
  • advanced - Complex, difficult, expert-level issues

Technology Labels

  • react - React components, JSX, TSX
  • typescript - TypeScript, types, interfaces
  • styling - CSS, styling, Tailwind, design
  • api - API endpoints, requests, responses
  • performance - Performance optimization, speed improvements
  • security - Security issues, vulnerabilities, authentication
  • accessibility - Accessibility improvements, a11y, ARIA

Default Label

  • help wanted - Applied when no specific type is detected

🎯 Keyword Detection

Bug Detection

Triggers bug label:

  • bug, error, issue, problem, broken, fail, crash, exception

Enhancement Detection

Triggers enhancement label:

  • feature, add, new, implement, create

Documentation Detection

Triggers documentation label:

  • doc, documentation, readme, guide, tutorial

Priority Detection

High Priority: urgent, critical, blocker, asap, immediately
Low Priority: minor, small, trivial, nice to have, low priority

Difficulty Detection

Good First Issue: beginner, easy, simple, starter, first time, good first issue
Advanced: complex, advanced, difficult, hard, expert

Technology Detection

  • React: react, jsx, tsx, component
  • TypeScript: typescript, ts, type, interface
  • Styling: css, style, styling, tailwind, design
  • API: api, endpoint, request, response, fetch
  • Performance: performance, slow, speed, optimize, load time
  • Security: security, vulnerability, exploit, auth, permission
  • Accessibility: accessibility, a11y, screen reader, aria

📝 Examples

Issue Titles → Labels Applied

Issue Title Labels Applied
"Bug: Login button not working" bug
"Add dark mode feature" enhancement
"Update README documentation" documentation
"URGENT: Critical security vulnerability" bug, priority: high, security
"Simple CSS fix for beginners" styling, good first issue
"Complex React component refactoring" react, refactoring, advanced
"Improve API performance" api, performance
"Add TypeScript interfaces" typescript, enhancement

🔄 Workflow Triggers

The auto-labeling runs when:

  • ✅ New issues are opened
  • ✅ Existing issues are edited (title or description changes)

🛠️ Customization

To modify the labeling logic:

  1. Add New Keywords: Update the regex patterns in the workflow
  2. Add New Labels: Add detection logic and label assignment
  3. Change Priority: Reorder the if-elif statements for different precedence

Example: Adding a New Label

# Add to the workflow
if [[ "$COMBINED_TEXT" =~ (mobile|responsive|tablet|phone) ]]; then
  LABELS+=("mobile")
  echo "📱 Detected: Mobile"
fi

🔍 Troubleshooting

Labels Not Applied?

  1. Check the Actions tab for workflow run details
  2. Verify the keywords are present in title or description
  3. Ensure the repository has the required labels created

Wrong Labels Applied?

  1. Review the keyword detection logic
  2. Consider the precedence order (first match wins for type labels)
  3. Edit the issue to trigger re-labeling

Missing Labels?

Create missing labels in your repository:

  • Go to Issues → Labels → New Label
  • Add the label name and choose a color

🚀 Benefits

  • Consistent Labeling: Ensures all issues get appropriate labels
  • Time Saving: Eliminates manual labeling for maintainers
  • Better Organization: Improves issue discoverability and filtering
  • Contributor Friendly: Helps new contributors find suitable issues
  • Intelligent Detection: Analyzes both title and content for accuracy

🎨 Recommended Label Colors

Label Color Hex Code
bug Red #d73a4a
enhancement Green #a2eeef
documentation Blue #0075ca
good first issue Purple #7057ff
priority: high Orange #d93f0b
priority: low Gray #6c757d
react Cyan #61dafb
typescript Blue #3178c6

This auto-labeling system ensures your issues are consistently organized and easily discoverable! 🎉

@adity1raut
Copy link
Contributor Author

Screenshot From 2025-10-02 14-02-01

@vatsalsinghkv vatsalsinghkv added hacktoberfest This issue is a part of hacktoberfest hacktoberfest-accepted This PR is accepted for Hacktoberfest labels Oct 3, 2025
@vercel
Copy link

vercel bot commented Oct 3, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
easy-fix Ready Ready Preview Comment Oct 3, 2025 8:19am

@vatsalsinghkv vatsalsinghkv merged commit 5dd69f0 into vatsalsinghkv:main Oct 3, 2025
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest This issue is a part of hacktoberfest hacktoberfest-accepted This PR is accepted for Hacktoberfest

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add CI tool for auto labelling the issue.

2 participants