From fde0de6f4278ee129b59995f554da9674fa4a04d Mon Sep 17 00:00:00 2001 From: RamGopalSrikar Date: Wed, 15 Apr 2026 14:21:00 -0400 Subject: [PATCH] ci(i18n): auto-bake note keys on template JSON changes in CI Extends gp-backend-check.yml to trigger on starter_projects/** changes and runs bake_note_keys.py before extract_backend_strings.py so any new noteNodes get i18n_key stamped automatically on PR branches. --- .github/workflows/gp-backend-check.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gp-backend-check.yml b/.github/workflows/gp-backend-check.yml index d332ae6c60..0a1f9daf36 100644 --- a/.github/workflows/gp-backend-check.yml +++ b/.github/workflows/gp-backend-check.yml @@ -4,6 +4,7 @@ on: pull_request: paths: - "src/lfx/src/lfx/components/**" + - "src/backend/base/langflow/initial_setup/starter_projects/**" jobs: auto-commit: @@ -22,6 +23,9 @@ jobs: ref: ${{ github.head_ref }} token: ${{ secrets.GITHUB_TOKEN }} + - name: Bake i18n_key into template noteNodes + run: python scripts/gp/bake_note_keys.py + - name: Setup uv uses: astral-sh/setup-uv@v6 with: @@ -35,10 +39,11 @@ jobs: - name: Generate en.json run: uv run python scripts/gp/extract_backend_strings.py - - name: Commit updated en.json to PR branch if changed + - name: Commit updated files to PR branch if changed run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" + git add src/backend/base/langflow/initial_setup/starter_projects/ git add src/backend/base/langflow/locales/en.json - git diff --staged --quiet || git commit -m "chore: auto-regenerate backend locales/en.json [skip ci]" + git diff --staged --quiet || git commit -m "chore: auto-bake note keys and regenerate backend locales/en.json [skip ci]" git push