Skip to content

Merge strings for train 52879 #261

Merge strings for train 52879

Merge strings for train 52879 #261

name: Lint Reference Files
on:
push:
branches:
- main
paths:
- '.github/linter_config.yml'
- 'locale/en/**.ftl'
pull_request:
branches:
- main
paths:
- '.github/linter_config.yml'
- 'locale/en/**.ftl'
workflow_dispatch:
jobs:
linter:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install Python dependencies
run: |
pip install -r .github/requirements.txt
- name: Lint reference
run: |
moz-fluent-lint ./locale/en --config .github/linter_config.yml
- name: Check for unchanged IDs
run: |
diff=$( git diff --name-only ${{ github.event.pull_request.base.sha }} $GITHUB_SHA )
for file in $diff; do
mkdir -p "temp_base/${file%/*}/" && mkdir -p "temp_head/${file%/*}/"
git show ${{ github.event.pull_request.base.sha }}:$file > temp_base/$file
git show $GITHUB_SHA:$file > temp_head/$file
done
python .github/scripts/detect_unchanged_ids.py --base_dir temp_base --head_dir temp_head --locale_dir locale/en
if: github.event_name == 'pull_request'