diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 000000000..848bd7a5c --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,13 @@ +translations: + - any: + - changed-files: + - any-glob-to-any-file: 'src/lang/*.json' + +docs: + - any: + - changed-files: + - any-glob-to-any-file: '**/*.md' + +enhancement: + - any: + - head-branch: ['^feature', 'feature', '^feat', '^add'] \ No newline at end of file diff --git a/.github/workflows/add-pr-labels.yml b/.github/workflows/add-pr-labels.yml new file mode 100644 index 000000000..f9b979fbb --- /dev/null +++ b/.github/workflows/add-pr-labels.yml @@ -0,0 +1,17 @@ +name: Add Pull Requests Labels +on: + pull_request_target: + types: [opened] + +jobs: + add-labels: + timeout-minutes: 5 + runs-on: ubuntu-latest + + if: github.event.action == 'opened' + permissions: + contents: read + pull-requests: write + + steps: + - uses: actions/labeler@v6 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 788d228c4..0ae6e0907 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,3 +33,34 @@ jobs: - name: Run Biome run: biome ci . + + translation-check: + name: Translation Check (On PR Only) + timeout-minutes: 5 + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read + if: github.event_name == 'pull_request' + steps: + - name: Checkout Repository + uses: actions/checkout@v5 + - name: Use Node.js + uses: actions/setup-node@v5 + with: + cache: npm + cache-dependency-path: '**/package-lock.json' + + - name: Detect Changed Files + uses: dorny/paths-filter@v3 + id: file-changes + with: + list-files: shell + filters: | + translation: + - 'src/lang/*.json' + token: ${{ secrets.GITHUB_TOKEN }} + - name: Translation Files Check (if changed) + if: steps.file-changes.outputs.translation == 'true' + run: | + npm run lint check \ No newline at end of file