Skip to content
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

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

dakshsinghrathore
Copy link
Owner

Related Issue

Description

Screenshots

Copy link

vercel bot commented Apr 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
brighter-beginnings ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 25, 2024 9:40pm

@dakshsinghrathore dakshsinghrathore merged commit 70f9819 into dakshsinghrathore:main Apr 25, 2024
4 of 5 checks passed
Copy link

@github-actions github-actions bot left a 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

Comment on lines +16 to +54
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.body }}, which may be controlled by an external user.
Potential injection from the ${{ github.event.issue.title }}, which may be controlled by an external user.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant