chore(deps-dev): bump ip from 1.1.8 to 1.1.9 #2356
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: Pull Request Checks | |
on: | |
pull_request: | |
types: | |
- opened | |
# This `edited` flag is why we need a separate workflow - | |
# specifying edited here causes this job to be re-run whenever someone edits the PR title/description. | |
# If we had the debug builds in this file, they would run unnecessarily, costing resources. | |
- edited | |
- synchronize | |
jobs: | |
name_check: | |
name: Pull Request Name Check | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: read | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Clone Repository | |
uses: actions/checkout@v3 | |
- name: Install Node | |
uses: actions/[email protected] | |
with: | |
node-version: 18 | |
cache: npm | |
- name: Install NPM Dependencies | |
run: npm ci | |
- name: Ensure Commitizen Format | |
uses: JulienKode/pull-request-name-linter-action@98794a8b815ec05560813c42e55fd8d32d3fd248 | |
size_label: | |
name: Change Size Label | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: write | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
# size-label-action fails to work when coming from a fork: | |
# https://github.com/pascalgn/size-label-action/issues/10 | |
- if: ${{ !github.event.pull_request.head.repo.fork }} | |
name: Apply Size Label | |
uses: pascalgn/size-label-action@a4655c448bb838e8d73b81e97fd0831bb4cbda1e | |
env: | |
IGNORED: | | |
LICENSE | |
package-lock.json | |
resources | |
src/www/assets/** | |
src/www/messages/** | |
third_party/** | |
with: | |
sizes: > | |
{ | |
"0": "XS", | |
"64": "S", | |
"128": "M", | |
"256": "L", | |
"512": "XL", | |
"1024": "XXL" | |
} | |
needs_test: | |
name: 'Fail if Needs Test Label' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Fail if Needs Test Label | |
if: contains(github.event.pull_request.labels.*.name, 'need test') | |
run: | | |
echo "This PR has the 'need test' label. Please remove it before merging." | |
exit 1 | |
translations: | |
name: '[WIP] Missing Translations Label' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: write | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check resources/original_messages.json | |
id: changed-original-messages | |
uses: tj-actions/changed-files@v35 | |
with: | |
files: resources/original_messages.json | |
- name: Collect src/www/messages Changes | |
if: steps.changed-original-messages.outputs.any_changed == 'true' | |
id: changed-translated-messages | |
uses: tj-actions/changed-files@v35 | |
with: | |
files: src/www/messages/*.json | |
- name: Check src/www/messages Changes | |
if: steps.changed-original-messages.outputs.any_changed == 'true' | |
id: not-every-translation-changed | |
run: | | |
TRANSLATIONS_COUNT="$(ls src/www/messages | wc -l | xargs)" | |
IFS=' ' read -r -a TRANSLATED_MESSAGES <<< "${{ steps.changed-translated-messages.outputs.all_changed_files }}" | |
TRANSLATED_MESSAGES_COUNT="${#TRANSLATED_MESSAGES[@]}" | |
if [ "${TRANSLATED_MESSAGES_COUNT}" != "${TRANSLATIONS_COUNT}" ]; then | |
echo "Translations are not atomic. Please update all translations in a single commit." | |
echo "Changed translations: ${TRANSLATED_MESSAGES_COUNT}" | |
echo "Expected translations: ${TRANSLATIONS_COUNT}" | |
echo "result=true" >> "${GITHUB_OUTPUT}" | |
fi | |
- name: Apply 'Missing Translations' Label | |
if: steps.not-every-translation-changed.outputs.result == 'true' | |
uses: actions-ecosystem/action-add-labels@v1 | |
with: | |
labels: missing translations |