From 85d47fb0f673147f19c094156a1fcdfb07e04da1 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Fri, 7 Nov 2025 10:30:46 -0500 Subject: [PATCH 1/2] ci: Try to trigger a rebase before fetching weblate. --- .github/workflows/update-translations.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/update-translations.yml b/.github/workflows/update-translations.yml index 0e159f6507..796327d829 100644 --- a/.github/workflows/update-translations.yml +++ b/.github/workflows/update-translations.yml @@ -11,6 +11,13 @@ jobs: update-translations: runs-on: ubuntu-latest steps: + - name: Trigger a rebase in Weblate + run: | + pip install wlc + wlc --url https://hosted.weblate.org/api/ --key $WEBLATE_API_KEY pull zulip/zulip-flutter + with: + WEBLATE_API_KEY: ${{ secrets.WEBLATE_API_KEY }} + - uses: actions/checkout@v4 - name: Fetch and merge from Weblate From 8e9bb5a43cc7a5595dc610f21e7a654f59f320da Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Fri, 7 Nov 2025 10:32:06 -0500 Subject: [PATCH 2/2] ci: Deepen the initial fetch so it can overlap with weblate. If Weblate has failed to rebase atop the latest tip, we would rather have the shared commit history with which to construct a (slightly out-of-date) PR, than fail because we can't fetch the `weblate` repository because we don't have any shared history. --- .github/workflows/update-translations.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/update-translations.yml b/.github/workflows/update-translations.yml index 796327d829..7c04ceec85 100644 --- a/.github/workflows/update-translations.yml +++ b/.github/workflows/update-translations.yml @@ -19,6 +19,9 @@ jobs: WEBLATE_API_KEY: ${{ secrets.WEBLATE_API_KEY }} - uses: actions/checkout@v4 + with: + # Enough such that even a still-out-of-date weblate will have shared history + fetch-depth: 50 - name: Fetch and merge from Weblate # The commit message is generated in Weblate; see https://hosted.weblate.org/addon/17163/