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)."); }