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
This commit is contained in:
Cuong-Tran 2025-09-09 14:00:35 +07:00 committed by GitHub
parent 632856c2f2
commit 756da72536
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,