@@ -72,12 +72,33 @@ jobs:
7272 submodules : false
7373
7474 - name : Create generated PR tokens
75+ id : tokens
7576 uses : ./.github/actions/create-generated-pr-tokens
7677 with :
7778 contents-client-id : Iv23liOECG0slfuhz093
7879 contents-private-key : ${{ secrets.CLAWSWEEPER_APP_PRIVATE_KEY }}
7980 pull-request-client-id : Iv23liPJCozR0uHm6P7G
8081 pull-request-private-key : ${{ secrets.MANTIS_GITHUB_APP_PRIVATE_KEY }}
82+ pull-request-contents-permission : write
83+
84+ - name : Verify repository auto-merge setting
85+ env :
86+ GH_TOKEN : ${{ steps.tokens.outputs.pull-request-token }}
87+ REPOSITORY_NAME : ${{ github.event.repository.name }}
88+ REPOSITORY_OWNER : ${{ github.repository_owner }}
89+ run : |
90+ set -euo pipefail
91+ auto_merge_allowed="$(
92+ gh api graphql \
93+ -f query='query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { autoMergeAllowed } }' \
94+ -f owner="${REPOSITORY_OWNER}" \
95+ -f name="${REPOSITORY_NAME}" \
96+ --jq '.data.repository.autoMergeAllowed'
97+ )"
98+ if [[ "${auto_merge_allowed}" != "true" ]]; then
99+ echo "Repository auto-merge must be enabled before generated locale publication." >&2
100+ exit 1
101+ fi
81102
82103 refresh :
83104 needs : [resolve-base, publisher-preflight]
@@ -261,22 +282,13 @@ jobs:
261282 with :
262283 install-bun : " false"
263284
264- # Every worker observes the same source inventory. Generate it once here
265- # so locale patches remain independent and can be applied sequentially .
266- - name : Refresh shared native inventory
285+ # Source PRs own the stable-ID inventory. Locale workers only contribute
286+ # translations; derive every platform artifact once after combining them .
287+ - name : Refresh native generated artifacts
267288 run : node --import tsx scripts/native-app-i18n.ts sync --write
268289
269- - name : Refresh Android native resources
270- run : node --import tsx scripts/android-app-i18n.ts sync
271-
272- - name : Refresh Apple native resources
273- run : node --import tsx scripts/apple-app-i18n.ts sync-ios --write
274-
275290 - name : Validate native locale refresh
276- run : |
277- node --import tsx scripts/native-app-i18n.ts check
278- node --import tsx scripts/android-app-i18n.ts check
279- node --import tsx scripts/apple-app-i18n.ts check
291+ run : node --import tsx scripts/native-app-i18n.ts check
280292
281293 - name : Open or update generated locale PR
282294 uses : ./.github/actions/publish-generated-pr
@@ -289,9 +301,9 @@ jobs:
289301 head-branch : automation/native-app-locale-refresh
290302 commit-message : " chore(i18n): refresh native locales"
291303 pr-title : " chore(i18n): refresh native locales"
304+ auto-merge : " true"
292305 generated-paths : |
293306 apps/.i18n/native
294- apps/.i18n/native-source.json
295307 apps/.i18n/apple-translation-contradictions.json
296308 apps/android/app/src/main/java/ai/openclaw/app/i18n/NativeStringResources.kt
297309 apps/android/app/src/main/res/values*/assistant.xml
@@ -302,6 +314,7 @@ jobs:
302314 apps/ios/ShareExtension/*.lproj/InfoPlist.strings
303315 apps/ios/ActivityWidget/*.lproj/InfoPlist.strings
304316 invalidation-paths : |
317+ apps/.i18n/native-source.json
305318 apps/android/app/src/main
306319 apps/ios
307320 apps/macos/Sources
@@ -332,5 +345,3 @@ jobs:
332345
333346 - [Locale refresh run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
334347 - `node --import tsx scripts/native-app-i18n.ts check`
335- - `node --import tsx scripts/android-app-i18n.ts check`
336- - `node --import tsx scripts/apple-app-i18n.ts check`
0 commit comments