-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: labeler automation added v2 #194
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
70f9819
into
dakshsinghrathore:main
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job, @dakshsinghrathore! 🎉 Thank you for submitting your first pull request. Your contribution is valuable and I appreciate your efforts to improve my project.
I will promptly review your changes and offer feedback. Keep up the excellent work! Kindly remember to check my contributing guidelines
run: | | ||
# Extract issue title and body | ||
ISSUE_TITLE="${{ github.event.issue.title }}" | ||
ISSUE_BODY="${{ github.event.issue.body }}" | ||
|
||
# Custom logic for label classification | ||
if echo "$ISSUE_TITLE" | grep -iE "bug|error|issue"; then | ||
echo "Adding **'bug'** label..." | ||
gh issue edit "${{ github.event.issue.number }}" --add-label "bug" | ||
elif echo "$ISSUE_TITLE" | grep -iE "chore|maintenance|cleanup"; then | ||
echo "Adding **'chore'** label..." | ||
gh issue edit "${{ github.event.issue.number }}" --add-label "chore" | ||
elif echo "$ISSUE_TITLE" | grep -iE "documentation|docs"; then | ||
echo "Adding **'documentation'** label..." | ||
gh issue edit "${{ github.event.issue.number }}" --add-label "documentation" | ||
elif echo "$ISSUE_TITLE" | grep -iE "duplicate"; then | ||
echo "Adding **'duplicate'** label..." | ||
gh issue edit "${{ github.event.issue.number }}" --add-label "duplicate" | ||
elif echo "$ISSUE_TITLE" | grep -iE "enhancement|feature"; then | ||
echo "Adding **'enhancement'** label..." | ||
gh issue edit "${{ github.event.issue.number }}" --add-label "enhancement" | ||
elif echo "$ISSUE_TITLE" | grep -iE "good first issue"; then | ||
echo "Adding **'good first issue'** label..." | ||
gh issue edit "${{ github.event.issue.number }}" --add-label "good first issue" | ||
elif echo "$ISSUE_TITLE" | grep -iE "help wanted"; then | ||
echo "Adding **'help wanted'** label..." | ||
gh issue edit "${{ github.event.issue.number }}" --add-label "help wanted" | ||
elif echo "$ISSUE_TITLE" | grep -iE "invalid"; then | ||
echo "Adding **'invalid'** label..." | ||
gh issue edit "${{ github.event.issue.number }}" --add-label "invalid" | ||
elif echo "$ISSUE_TITLE" | grep -iE "question"; then | ||
echo "Adding **'question'** label..." | ||
gh issue edit "${{ github.event.issue.number }}" --add-label "question" | ||
elif echo "$ISSUE_TITLE" | grep -iE "wontfix|won't fix"; then | ||
echo "Adding **'wontfix'** label..." | ||
gh issue edit "${{ github.event.issue.number }}" --add-label "wontfix" | ||
else | ||
echo "No specific label found." | ||
fi |
Check failure
Code scanning / CodeQL
Expression injection in Actions Critical
Potential injection from the ${{ github.event.issue.title }}, which may be controlled by an external user.
Related Issue
Description
Screenshots