-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Description
Currently Weblate provides a PR that adds a commit per language (squashed). This is problematic as we still want to review contributions per language before merging them in, effectively limiting contributions to one language per time.
In order to resolve this we want to invest in some automation to split this PR into separate PRs per language to accommodate our workflow. The proposal is as follows:
Write a GitHub action that will trigger on pull_request, this is then further filtered down to only PRs targeting the main branch and only targeting .properties files (which contain our translations), for example:
on:
pull_request:
branches:
- main
paths:
- **messages_*.propertiesThen only if the PR is triggered from the Weblate fork of Keycloak will the workflow be allowed to continue. When continuing the workflow the following should happen:
Each commit in the Weblate PR should be cherry-picked onto a branch per language. This language code is stored in the following format in the commit:
Language: de
If a branch already exists it can be first reset to the latest HEAD of main and the commit can be applied on top and force pushed to the remote. Once a all branches have been pushed to the remote a PR should be opened for each if not already.