Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?? "";

Expand Down Expand Up @@ -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).");
}

Expand Down
Loading