Skip to content

Commit

Permalink
Add new workflow for pull requsts: Labeler
Browse files Browse the repository at this point in the history
  • Loading branch information
MysticalFaceLesS committed Aug 3, 2024
1 parent 4404ea2 commit 8e571fb
Show file tree
Hide file tree
Showing 2 changed files with 123 additions and 0 deletions.
92 changes: 92 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -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'
31 changes: 31 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8e571fb

Please sign in to comment.