diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 00000000..4b743b0a --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,36 @@ +# @see https://github.com/actions/labeler + +rust: + - changed-files: + - any-glob-to-any-file: ['crates/**', 'Cargo.toml'] + +typescript: + - changed-files: + - any-glob-to-any-file: + [ + 'packages/**', + 'package.json', + 'pnpm-*.yaml', + 'eslint.config.js', + 'tsconfig.json', + ] + +documentation: + - changed-files: + - any-glob-to-any-file: ['apps/documentation/**'] + +'CI/CD': + - changed-files: + - any-glob-to-any-file: ['.github/**'] + +'repo maintenance': + - changed-files: + - any-glob-to-any-file: + [ + '.npmrc', + '.nvmrc', + '.prettierrc', + '.prettierignore', + 'renovate.json', + 'turbo.json', + ] diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml new file mode 100644 index 00000000..badb2481 --- /dev/null +++ b/.github/workflows/pr-labeler.yml @@ -0,0 +1,27 @@ +name: 'PR Labeler' + +# @see https://github.com/actions/labeler +# @see .github/labeler.yml + +on: + - pull_request_target + +jobs: + labeler: + name: 'Manage labels' + + runs-on: ubuntu-latest + + permissions: + contents: read + pull-requests: write + + steps: + # Add checkout step to load labeler.yml locally, + # rather than from an API request + - name: Checkout code + uses: actions/checkout@v4 + + - uses: actions/labeler@v5 + with: + sync-labels: true