Skip to content

Commit f95d197

Browse files
jobobby04cuong-tran
authored andcommitted
Test to auto-add translations label
(cherry picked from commit b0aa2ff)
1 parent 4068267 commit f95d197

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/pr_label.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Label PRs
2+
3+
on:
4+
pull_request:
5+
types: [opened]
6+
7+
jobs:
8+
label_pr:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Check PR and Add Label
13+
uses: actions/github-script@v7
14+
with:
15+
script: |
16+
const prAuthor = context.payload.pull_request.user.login;
17+
18+
if (prAuthor === 'weblate') {
19+
const labels = ['Translations'];
20+
await github.issues.addLabels({
21+
owner: context.repo.owner,
22+
repo: context.repo.repo,
23+
issue_number: context.payload.pull_request.number,
24+
labels: labels
25+
});
26+
}

0 commit comments

Comments
 (0)