diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 00000000000..979ffa5f13d --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,92 @@ +# Any changes +'🔵 Требуется проверка': +- changed-files: + - any-glob-to-any-file: + - '**' + +# Changes to a .dmm or anything in the _map subfolder +'🗺 Мапинг': +- changed-files: + - any-glob-to-any-file: + - '**/*.dmm' + - 'maps/**' + +# Any .dmi changes +'🎨 Спрайты 🎨': +- changed-files: + - any-glob-to-any-file: + - '**/*.dmi' + +# Any changes if not in modulare folder +'🪓 НЕ МОДУЛЬНО 🪓': +- changed-files: + - any-glob-to-any-file: + - 'maps/**' + - 'code/**' + - 'icons/**' + - 'sound/**' + +# Any sounds changes +'🔊 Звуки 🔊': +- changed-files: + - any-glob-to-any-file: + - '**/*.aif' + - '**/*.aiff' + - '**/*.it' + - '**/*.mid' + - '**/*.midi' + - '**/*.mod' + - '**/*.mp3' + - '**/*.ogg' + - '**/*.oxm' + - '**/*.raw' + - '**/*.s3m' + - '**/*.wma' + - '**/*.wav' + - '**/*.xm' + +# Changes to the SQL subfolder +'📚 SQL 📚': +- changed-files: + - any-glob-to-any-file: + - '**/*.sql' + +# Changes to the tgui subfolder +'💬 TGUI': +- changed-files: + - any-glob-to-any-file: + - 'tgui/**' + +# Changes to the config subfolder +'🔮 Конфиги 🔮': +- changed-files: + - any-glob-to-any-file: + - 'config/**/*' + - 'config/example/**/*' + +# Changes to a .dm or anything in the code subfolder +'🧱 Код 🧱': +- changed-files: + - any-glob-to-any-file: + - '**/*.dm' + +# Changes to the .Github subfolder +'🏭 Github 🏭': +- changed-files: + - any-glob-to-any-file: + - '.github/**' + - '.github/**/*' + - '.vscode/**/*' + - 'docs/**/*' + - 'scripts/**/*' + - 'test/**/*' + - 'tools/**/*' + - '.codebeatignore' + - '.codebeatsettings' + - '.editorconfig' + - '.git*' + - 'biome.json' + - 'libmysql.dll' + - 'LICENSE' + - 'README.md' + - 'SpacemanDMM.toml' diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 00000000000..3bee7d05046 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,31 @@ +name: "Pull Request Labeler" + +permissions: + contents: read + +on: + push: + branches: + - master + pull_request_target: + +jobs: + triage: + permissions: + contents: read # may be required due to overwrite/add ambiguity + pull-requests: write # required to apply labels to PRs + runs-on: ubuntu-latest + steps: + - name: Check for conflicting PRs + uses: eps1lon/actions-label-merge-conflict@releases/2.x + with: + dirtyLabel: "_🚨_ Conflicts! _🚨_" + repoToken: "${{ secrets.GITHUB_TOKEN }}" + commentOnDirty: "Pull Request содержит конфликты. Устраните их, чтобы мы смогли оценить и принять запрос." + - name: Apply labels based on changed files + if: github.event_name != 'push' + uses: actions/labeler@v5 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + sync-labels: true + configuration-path: .github/labeler.yml