Skip to content

Feat: dasdas

Feat: dasdas #10

Workflow file for this run

name: Label Issues
on:
issues:
types:
- reopened
- opened
jobs:
label_issues:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Check Issue Type
run: |
# Extract issue title and body
# Custom logic for label classification
if echo "${TITLE}" | grep -iE "bug|error|issue|fix"; then
echo "Adding **'bug'** label..."
gh issue edit "${NUMBER}" --add-label "bug"
elif echo "${TITLE}" | grep -iE "chore|maintenance|cleanup|refactor"; then
echo "Adding **'chore'** label..."
gh issue edit "${NUMBER}" --add-label "chore"
elif echo "${TITLE}" | grep -iE "documentation|docs|typo"; then
echo "Adding **'documentation'** label..."
gh issue edit "${NUMBER}" --add-label "documentation"
elif echo "${TITLE}" | grep -iE "duplicate|identical|matching"; then
echo "Adding **'duplicate'** label..."
gh issue edit "${NUMBER}" --add-label "duplicate"
elif echo "${TITLE}" | grep -iE "enhancement|feature|feat|property|attribute"; then
echo "Adding **'enhancement'** label..."
gh issue edit "${NUMBER}" --add-label "enhancement"
elif echo "${TITLE}" | grep -iE "help wanted"; then
echo "Adding **'help wanted'** label..."
gh issue edit "${NUMBER}" --add-label "help wanted"
elif echo "${TITLE}" | grep -iE "invalid"; then
echo "Adding **'invalid'** label..."
gh issue edit "${NUMBER}" --add-label "invalid"
elif echo "${TITLE}" | grep -iE "question"; then
echo "Adding **'question'** label..."
gh issue edit "${NUMBER}" --add-label "question"
elif echo "${TITLE}" | grep -iE "wontfix|won't fix"; then
echo "Adding **'wontfix'** label..."
gh issue edit "${NUMBER}" --add-label "wontfix"
else
echo "No specific label found."
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUMBER: ${{ github.event.issue.number }}
TITLE: ${{ github.event.issue.title }}
BODY: ${{ github.event.issue.body }}
GH_REPO: ${{ github.repository }}