mirror of
https://github.com/lostpaul/obsidian-folder-notes.git
synced 2026-07-22 07:40:24 +00:00
Create label-beta.yml
This commit is contained in:
parent
2a1d71c106
commit
53bc204cf4
1 changed files with 30 additions and 0 deletions
30
.github/workflows/label-beta.yml
vendored
Normal file
30
.github/workflows/label-beta.yml
vendored
Normal 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']
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue