Skip to content

new strings

new strings #193

Workflow file for this run

name: Mistake Checker
on:
pull_request_target:
branches: [ master ]
paths:
- "translations/**"
jobs:
getfiles:
name: Check changed files for mistakes
runs-on: ubuntu-latest
permissions:
pull-requests: write
issues: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Check changed files for mistakes
id: mistakes
shell: bash
run: |
echo $(python ${{ github.workspace }}/.github/workflows/mistake_check.py ${{ github.event.pull_request.number }}) > mistakes.txt
echo ${{ github.event.pull_request.number }} > number.txt
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3.1.1
with:
name: mistakes
path: |
mistakes.txt
number.txt
- name: Output detected mistakes if any
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
let fs = require('fs');
const mistakes = JSON.parse(fs.readFileSync('./mistakes.txt').toString());
if (mistakes.length !== 0)
if (mistakes.map(mistake => mistake.condition).includes("invalid_format"))
core.setFailed("Mistakes found! Check comment for more details");