diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..09e0192 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,29 @@ +# Auto-label PRs based on files modified +frontend: + - "frontend/**" + - "*.html" + - "*.css" + - "*.js" + +backend: + - "backend/**" + - "*.py" + - "*.go" + - "*.java" + +documentation: + - "*.md" + - "docs/**" + +# Auto-label based on PR title or description content +bugfix: + - "fix" + - "bug" + +feature: + - "feature" + - "enhance" + +# Auto-label based on PR state +draft: + - "draft" diff --git a/.github/workflows/auto-label.yml b/.github/workflows/auto-label.yml new file mode 100644 index 0000000..966d290 --- /dev/null +++ b/.github/workflows/auto-label.yml @@ -0,0 +1,17 @@ +name: Auto Label PR + +on: + pull_request: + types: [opened, synchronize, reopened, edited] + +jobs: + label: + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v3 + + - name: Auto-label PR based on status and content + uses: actions-ecosystem/action-labeler@v1 + with: + configuration-path: .github/labeler.yml