Skip to content

Commit

Permalink
Add checks for the PR's
Browse files Browse the repository at this point in the history
  • Loading branch information
c4llv07e committed Nov 2, 2024
1 parent 6928036 commit 1ce561d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/c4-check-cyrillic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Cyrillic Check

on:
pull_request:
types: [ opened, reopened, synchronize, ready_for_review ]

jobs:
build:
name: Cyrillic Check
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
# I'm not sure if we need to checkout there
# - uses: actions/[email protected]
- name: Check for cyrillic names in the files
run: Tools/_Adventure/check_cyrillic.sh
8 changes: 3 additions & 5 deletions .github/workflows/check-crlf.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: CRLF Check

# c4llv07e disable automatic workflows begin
# on:
# pull_request:
# types: [ opened, reopened, synchronize, ready_for_review ]
# c4llv07e disable automatic workflows end
on:
pull_request:
types: [ opened, reopened, synchronize, ready_for_review ]

jobs:
build:
Expand Down
4 changes: 4 additions & 0 deletions Tools/_Adventure/check_cyrillic.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/sh
set -xue
(! git grep -IP -e "([a-zA-Z][а-яА-Я]|[а-яА-Я][a-zA-Z])" --and --not -e "\\\n[а-яА-Я]" "${GITHUB_BASE_REF}")
(! git ls-tree --full-tree -r "${GITHUB_BASE_REF}" | grep -P "[а-яА-Я]")

0 comments on commit 1ce561d

Please sign in to comment.