[Spec] sse #25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto-label new spec issues | |
on: | |
issues: | |
types: [opened] | |
permissions: | |
issues: write | |
jobs: | |
label: | |
if: startsWith(github.event.issue.title, '[Spec]') | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/github-script@v7 | |
with: | |
script: | | |
const label = 'spec:proposal'; | |
// create label if it doesn't exist | |
try { | |
await github.rest.issues.addLabels({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: context.payload.issue.number, | |
labels: [label] | |
}); | |
} catch (e) { | |
core.warning(`Could not add label: ${e.message}`); | |
} |