Skip to content

JupyterLab 4.2.0rc0 (release candidate) (#666) #194

JupyterLab 4.2.0rc0 (release candidate) (#666)

JupyterLab 4.2.0rc0 (release candidate) (#666) #194

Workflow file for this run

name: Update source strings
on:
push:
branches:
- main
paths:
- repository-map.yml
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
update_pot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install gettext
run: sudo apt-get install gettext
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install -r requirements.txt
- name: Update po templates (merging with existing)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python scripts/02_update_catalogs.py
- name: Create a PR optionally
shell: bash
env:
GITHUB_USER: ${{ secrets.GITHUB_USER }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -eux
if [[ ! -z "$(git status --porcelain *.pot crowdin.yml)" ]]; then
export COMMIT_SHA=$(git rev-parse --short HEAD)
export BRANCH_NAME=pot-update-${COMMIT_SHA}
git checkout -b "${BRANCH_NAME}"
git config user.name "JupyterLab Language Packs Bot"
git config user.email 'jupyterlab-bot@users.noreply.github.com'
git add *.pot crowdin.yml
git commit -m "Update pot files"
git push --set-upstream origin "${BRANCH_NAME}"
gh pr create -B "main" -t "Update pot files" -b "New changes to pot files were detected in ${COMMIT_SHA} commit."
fi