Skip to content

chore: Make version updates less fiddly #13

chore: Make version updates less fiddly

chore: Make version updates less fiddly #13

Workflow file for this run

name: PR / Label
on:
pull_request_target: { }
jobs:
triage:
name: Triage
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Apply commit message labels
uses: actions/github-script@v7
with:
script: |
const labels = []
if (context.payload.pull_request.title.startsWith('fix:')) {
labels.push('bug 🐛')
}
if (context.payload.pull_request.title.startsWith('chore:')) {
labels.push('chore 🧹')
}
if (context.payload.pull_request.title.startsWith('feat:')) {
labels.push('feature 💡')
}
if (labels.length > 0) {
github.rest.issues.addLabels({
issue_number: context.issue.number,
labels,
owner: context.repo.owner,
repo: context.repo.repo,
})
}