diff --git a/.github/workflows/translation.yml b/.github/workflows/translation.yml index 0fbb4cb5dd..34ba964fc0 100644 --- a/.github/workflows/translation.yml +++ b/.github/workflows/translation.yml @@ -30,6 +30,11 @@ on: jobs: check-translation: runs-on: ubuntu-latest + permissions: + contents: read + issues: write + pull-requests: write + steps: - name: Checkout code uses: actions/checkout@v4 @@ -52,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 diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000000..50e47c89ca --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.1.1 \ No newline at end of file diff --git a/Gemfile b/Gemfile index 019af18d2e..c1d2754bd5 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,7 @@ source 'https://rubygems.org' +ruby '3.1.1' + gem 'github-pages', group: :jekyll_plugins gem 'webrick'