diff --git a/.github/workflows/translation.yml b/.github/workflows/translation.yml index 2309027350..34ba964fc0 100644 --- a/.github/workflows/translation.yml +++ b/.github/workflows/translation.yml @@ -57,9 +57,11 @@ jobs: }); const modifiedLanguages = new Set(files.map(file => file.filename.split('/')[0])); const labelsToAdd = languages.filter(lang => !modifiedLanguages.has(lang)).map(lang => `requires-translation-${lang}`); - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: pullRequest.number, - labels: labelsToAdd - }); \ No newline at end of file + if (labelsToAdd.length > 0) { + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: pullRequest.number, + labels: labelsToAdd + }); + } \ No newline at end of file