diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000000..bd3cb3ed7b --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,55 @@ +# Rules for automatically applying labels to PRs +# See also: https://github.com/actions/labeler + +# General labels +'build': + - changed-files: + - any-glob-to-any-file: + - '.github/*' + - '.github/**/*' + - 'cmake/*' + - 'cmake/**/*' + - 'scripts/*' + - 'CMakeLists.txt' + - '**/CMakeLists.txt' + - '*.sln' + - '**/*.vcxproj' +'documentation': + - changed-files: + - any-glob-to-any-file: + - '*.md' + - '**/*.md' + +# Localisation +'localisation': + - changed-files: + - any-glob-to-any-file: + - 'data/language/en-GB.txt' + +# Game components +'actions': + - changed-files: + - any-glob-to-any-file: + - 'src/openrct2/actions/*' +'map generator': + - changed-files: + - any-glob-to-any-file: + - 'src/openrct2/world/map_generator/*' +'network': + - changed-files: + - any-glob-to-any-file: + - 'src/openrct2/network/*' +'paint': + - changed-files: + - any-glob-to-any-file: + - 'src/openrct2/paint/*' + +# Platform code +'platform': + - changed-files: + - any-glob-to-any-file: + - 'src/openrct2/platform/*' +'android': + - changed-files: + - any-glob-to-any-file: + - 'src/openrct2-android/*' diff --git a/.github/workflows/label-prs.yml b/.github/workflows/label-prs.yml new file mode 100644 index 0000000000..405ec01808 --- /dev/null +++ b/.github/workflows/label-prs.yml @@ -0,0 +1,18 @@ +# This workflow automatically labels new pull requests +# See labeler.yml for the label rules involved + +name: Apply labels to pull request +on: pull_request_target + +jobs: + labeler: + permissions: + contents: read + issues: write # automatically creates labels + pull-requests: write # assigning labels to PRs + runs-on: ubuntu-latest + if: github.repository == 'OpenRCT2/OpenRCT2' + steps: + - uses: actions/labeler@v6 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }}