Skip to content

Commit

Permalink
feat: labeler automation added v4
Browse files Browse the repository at this point in the history
  • Loading branch information
dakshsinghrathore committed Apr 25, 2024
1 parent ac7b25f commit 6edfe3a
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,36 +16,36 @@ jobs:
run: |
# Extract issue title and body
# Custom logic for label classification
if echo "$ISSUE_TITLE" | grep -iE "bug|error|issue"; then
if echo "${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
gh issue edit "${NUMBER}" --add-label "bug"
elif echo "${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
gh issue edit "${NUMBER}" --add-label "chore"
elif echo "${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
gh issue edit "${NUMBER}" --add-label "documentation"
elif echo "${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
gh issue edit "${NUMBER}" --add-label "duplicate"
elif echo "${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
gh issue edit "${NUMBER}" --add-label "enhancement"
elif echo "${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
gh issue edit "${NUMBER}" --add-label "good first issue"
elif echo "${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
gh issue edit "${NUMBER}" --add-label "help wanted"
elif echo "${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
gh issue edit "${NUMBER}" --add-label "invalid"
elif echo "${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
gh issue edit "${NUMBER}" --add-label "question"
elif echo "${TITLE}" | grep -iE "wontfix|won't fix"; then
echo "Adding **'wontfix'** label..."
gh issue edit "${{ github.event.issue.number }}" --add-label "wontfix"
gh issue edit "${NUMBER}" --add-label "wontfix"
else
echo "No specific label found."
fi
Expand Down

0 comments on commit 6edfe3a

Please sign in to comment.