Skip to content

build(deps): bump ksp from 2.3.6 to 2.3.7 #42

build(deps): bump ksp from 2.3.6 to 2.3.7

build(deps): bump ksp from 2.3.6 to 2.3.7 #42

Workflow file for this run

name: Label PRs
on:
pull_request:
types: [opened, synchronize]
permissions:
contents: read
pull-requests: write
jobs:
area-labels:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
with:
sync-labels: false
type-label:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
with:
script: |
const title = context.payload.pull_request.title;
const prefixMap = {
'feat': 'type: feature',
'fix': 'type: fix',
'refactor': 'type: refactor',
'chore': 'type: chore',
'build': 'type: build',
'test': 'type: test',
'docs': 'type: docs',
};
const match = title.match(/^(\w+)(\(.+\))?[!]?:/);
if (!match) return;
const prefix = match[1];
const label = prefixMap[prefix];
if (!label) return;
const { data: labels } = await github.rest.issues.listLabelsOnIssue({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
});
if (labels.some(l => l.name === label)) return;
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: [label],
});