Create label-beta.yml

This commit is contained in:
Lost Paul 2025-06-11 10:37:22 +02:00 committed by GitHub
parent 2a1d71c106
commit 53bc204cf4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

30
.github/workflows/label-beta.yml vendored Normal file
View file

@ -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']
});
}
}