Test to auto-add translations label
This commit is contained in:
parent
45b5d9b8a4
commit
b0aa2ffc42
26
.github/workflows/pr_label.yml
vendored
Normal file
26
.github/workflows/pr_label.yml
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
name: Label PRs
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [opened]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
label_pr:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check PR and Add Label
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const prAuthor = context.payload.pull_request.user.login;
|
||||||
|
|
||||||
|
if (prAuthor === 'weblate') {
|
||||||
|
const labels = ['Translations'];
|
||||||
|
await github.issues.addLabels({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
issue_number: context.payload.pull_request.number,
|
||||||
|
labels: labels
|
||||||
|
});
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user