diff --git a/.github/workflows/translation.yml b/.github/workflows/translation.yml deleted file mode 100644 index 34ba964fc0..0000000000 --- a/.github/workflows/translation.yml +++ /dev/null @@ -1,67 +0,0 @@ -name: Check Translation - -on: - pull_request: - branches: - - gh-pages - paths: - - 'en/**' - - 'es/**' - - 'fr/**' - - 'it/**' - - 'id/**' - - 'ja/**' - - 'ko/**' - - 'pt-br/**' - - 'ru/**' - - 'sk/**' - - 'th/**' - - 'tr/**' - - 'uk/**' - - 'uz/**' - - 'zh-cn/**' - - 'zh-tw/**' - workflow_dispatch: - inputs: - prNumber: - description: 'PR number to check' - required: true - -jobs: - check-translation: - runs-on: ubuntu-latest - permissions: - contents: read - issues: write - pull-requests: write - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Check modified files and add labels - uses: actions/github-script@v5 - with: - script: | - const languages = ['en', 'es', 'fr', 'it', 'id', 'ja', 'ko', 'pt-br', 'ru', 'sk', 'th', 'tr', 'uk', 'uz', 'zh-cn', 'zh-tw']; - const prNumber = context.eventName === 'workflow_dispatch' ? context.payload.inputs.prNumber : context.issue.number; - const { data: pullRequest } = await github.rest.pulls.get({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: prNumber - }); - const { data: files } = await github.rest.pulls.listFiles({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: prNumber - }); - const modifiedLanguages = new Set(files.map(file => file.filename.split('/')[0])); - const labelsToAdd = languages.filter(lang => !modifiedLanguages.has(lang)).map(lang => `requires-translation-${lang}`); - 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