Skip to content

Commit

Permalink
Test to auto-add translations label
Browse files Browse the repository at this point in the history
  • Loading branch information
jobobby04 committed Aug 23, 2024
1 parent 45b5d9b commit b0aa2ff
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/pr_label.yml
Original file line number Diff line number Diff line change
@@ -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
});
}

0 comments on commit b0aa2ff

Please sign in to comment.