Update sl.json #46
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check Locale PR | |
on: | |
pull_request: | |
paths: | |
- 'locale/**' | |
jobs: | |
check-locale-pr: | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
steps: | |
- name: Enforce base branch | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
// Get the pull request | |
const pull_request = await github.rest.pulls.get({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
pull_number: context.payload.pull_request.number | |
}); | |
// Check if the base branch is 'main' or 'master' | |
if (pull_request.data.base.ref === 'main' || pull_request.data.base.ref === 'master') { | |
console.error('Pull request is targeting the main branch. Please target the develop branch instead.'); | |
process.exit(1); | |
} | |
- name: Use Node.js 22 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: npm ci | |
- name: Run locale:check | |
id: locale-check | |
run: npm run locale:check |