From 756da725364482d1601649f78848a9be5daae39d Mon Sep 17 00:00:00 2001 From: Cuong-Tran Date: Tue, 9 Sep 2025 14:00:35 +0700 Subject: [PATCH] chore(pr_label): Update permissions and label conditions for pull requests (#1131) * chore(pr_label): Update permissions and label conditions for pull requests * revert author --- .github/workflows/pr_label.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr_label.yml b/.github/workflows/pr_label.yml index ea29e3f6d..1641c4404 100644 --- a/.github/workflows/pr_label.yml +++ b/.github/workflows/pr_label.yml @@ -5,7 +5,9 @@ on: types: [opened] permissions: - contents: write + contents: read + pull-requests: write + issues: write jobs: label_pr: @@ -19,8 +21,8 @@ jobs: const prAuthor = context.payload.pull_request.user.login; if (prAuthor === 'weblate') { - const labels = ['Translations']; - await github.issues.addLabels({ + const labels = ['translations']; + await github.rest.issues.addLabels({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.payload.pull_request.number,