diff --git a/.github/pr-labler-config.yaml b/.github/pr-labler-config.yaml new file mode 100644 index 0000000..55c4309 --- /dev/null +++ b/.github/pr-labler-config.yaml @@ -0,0 +1,21 @@ +feat: + - head-branch: ["^feat", "^feature"] + +fix: + - head-branch: ["^fix"] + +refactor: + - head-branch: ["^refactor"] + +api: + - changed-files: + - any-glob-to-any-file: ["src/app/api/*"] + +db: + - changed-files: + - any-glob-to-any-file: ["src/lib/db/*", "drizzle.config.ts"] + +chore: + - head-branch: ["^chore"] + - changed-files: + - any-glob-to-any-file: ["package.json", "bun.lockb"] diff --git a/.github/workflows/pr-labler.yaml b/.github/workflows/pr-labler.yaml new file mode 100644 index 0000000..0a67f04 --- /dev/null +++ b/.github/workflows/pr-labler.yaml @@ -0,0 +1,15 @@ +name: "Pull Request Labeler" +on: + - pull_request_target + +jobs: + labeler: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: "./.github/pr-labeler-config.yaml"