From 372093cf527187597ef087810df707ece0ede834 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 1 Dec 2026 14:48:21 +0100 Subject: [PATCH] Let members and collaborators edit translations in the PR checks The translation file check only allowed the ElementBot user. Exempt authors whose association is MEMBER or COLLABORATOR instead, as done on Element X iOS. External contributors are still blocked from changing translated strings. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/pr-checks.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index bee3907bf8d..ca157786aed 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -35,9 +35,6 @@ jobs: const FROZEN_CLASSES = [ ]; - // Only this user is allowed to edit the translation files, since they come from Localazy. - const TRANSLATION_ALLOW_LIST = ["ElementBot"]; - const pr = context.payload.pull_request; const body = pr.body ?? ""; @@ -79,8 +76,9 @@ jobs: warnings.push("You seem to have made changes to some images. Please consider using a vector drawable."); } - if (!TRANSLATION_ALLOW_LIST.includes(pr.user.login) && paths.some(path => path.endsWith("translations.xml"))) { - failures.push("Some translation files have been edited. Only user `ElementBot` (i.e. translations coming from Localazy) is allowed to do that. " + + // Translations come from Localazy. Members and collaborators (including the bot syncing the translations) are trusted. + if (!["MEMBER", "COLLABORATOR"].includes(pr.author_association) && paths.some(path => path.endsWith("translations.xml"))) { + failures.push("Changes to translated strings detected. Please make these through Localazy. " + "Please read more about translations management [in the doc](https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#strings)."); }