diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..5215386 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,82 @@ +# --------------------------- +# Labels based on file paths +# --------------------------- +frontend: + - "src/frontend/**" + - "*.css" + - "*.js" + - "*.html" + +backend: + - "src/backend/**" + - "*.py" + - "*.java" + - "*.sh" + - "*.bash" + - "Makefile" + +database: + - "db/**" + - "*.sql" + +tests: + - "tests/**" + - "*.test.js" + - "*.spec.py" + +documentation: + - "docs/**" + - "*.md" + - "README.md" + +# --------------------------- +# Labels based on keywords +# --------------------------- +bug: + - "error" + - "bug" + - "failed" + - "unexpected" +enhancement: + - "feature" + - "enhance" + - "improvement" + - "upgrade" +documentation: + - "docs" + - "readme" + - "manual" + +# --------------------------- +# Labels based on types +# --------------------------- +type/bug: + - "*.bugfix" +type/feature: + - "*.feature" +type/refactor: + - "*.refactor" + +# --------------------------- +# Labels based on priority +# --------------------------- +priority/high: + - "**/critical/**" +priority/medium: + - "**/important/**" +priority/low: + - "**/optional/**" + +# --------------------------- +# Labels based on status +# --------------------------- +status/in-progress: + - "WIP" + - "work in progress" + - "incomplete" +status/review: + - "needs review" + - "review required" +status/done: + - "completed" + - "finished" diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000..0fac2a2 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,21 @@ +name: "Issue and PR Labeler" + +on: + pull_request: + types: [opened, synchronized, edited] + issues: + types: [opened, edited] + +jobs: + label: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Run Labeler + uses: actions/labeler@v4 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: .github/labeler.yml