diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..2216e4a --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,19 @@ +docs: +- changed-files: + - any-glob-to-any-file: '*.md' + +frontend: +- changed-files: + - any-glob-to-any-file: 'frontend/**/*' + - any-glob-to-any-file: 'frontend/**/*.js' + - any-glob-to-any-file: 'frontend/**/*.ts' + - any-glob-to-any-file: 'frontend/**/*.tsx' + - any-glob-to-any-file: 'frontend/**/*.jsx' + - any-glob-to-any-file: 'frontend/**/*.css' + - any-glob-to-any-file: 'frontend/**/*.html' + +backend: + - changed-files: + - any-glob-to-any-file: 'backend/**/*' + - any-glob-to-any-file: 'backend/**/*.go' + - any-glob-to-any-file: 'backend/**/*.py' \ No newline at end of file diff --git a/.github/workflows/pr_labeler.yml b/.github/workflows/pr_labeler.yml new file mode 100644 index 0000000..0329a2c --- /dev/null +++ b/.github/workflows/pr_labeler.yml @@ -0,0 +1,40 @@ +name: PR Labeler + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + file-labeler: + needs: size-label + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Add file-based labels + uses: actions/labeler@v5 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + configuration-path: .github/labeler.yml + + size-label: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - name: size-label + uses: "pascalgn/size-label-action@v0.5.5" + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + with: + sizes: > + { + "0": "XS", + "20": "S", + "50": "M", + "200": "L", + "800": "XL", + "2000": "XXL" + } \ No newline at end of file