From 53bc204cf4cd92af1dc98ac84934738b03af13b8 Mon Sep 17 00:00:00 2001 From: Lost Paul <70213368+LostPaul@users.noreply.github.com> Date: Wed, 11 Jun 2025 10:37:22 +0200 Subject: [PATCH] Create label-beta.yml --- .github/workflows/label-beta.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/label-beta.yml diff --git a/.github/workflows/label-beta.yml b/.github/workflows/label-beta.yml new file mode 100644 index 0000000..450e535 --- /dev/null +++ b/.github/workflows/label-beta.yml @@ -0,0 +1,30 @@ +name: Label Beta Issues + +on: + issues: + types: [opened, edited] + +jobs: + label-beta: + runs-on: ubuntu-latest + + steps: + - name: Check for Beta Version checkbox + uses: actions/github-script@v7 + with: + script: | + const betaChecked = context.payload.issue.body.includes("- [x] Beta version"); + + if (betaChecked) { + const issue_number = context.payload.issue.number; + const labels = context.payload.issue.labels.map(label => label.name); + + if (!labels.includes('beta')) { + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue_number, + labels: ['beta'] + }); + } + }