Skip to content

[FC-0003] Single-Package-Integration von CSCore inkl. Packaging-/Consumer-Gates (toolchain-stabil) #31

[FC-0003] Single-Package-Integration von CSCore inkl. Packaging-/Consumer-Gates (toolchain-stabil)

[FC-0003] Single-Package-Integration von CSCore inkl. Packaging-/Consumer-Gates (toolchain-stabil) #31

Workflow file for this run

name: Issue Labeler
on:
issues:
types: [opened, edited]
permissions:
issues: write
jobs:
label:
runs-on: ubuntu-latest
steps:
- name: Apply labels from keywords
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
with:
script: |
const title = (context.payload.issue.title || '').toLowerCase();
const body = (context.payload.issue.body || '').toLowerCase();
const text = `${title}\n${body}`;
const labels = new Set();
const addIf = (cond, label) => { if (cond) labels.add(label); };
addIf(text.includes('breaking') || text.includes('major'), 'breaking');
addIf(text.includes('feature') || text.includes('minor'), 'feature');
addIf(text.includes('fix') || text.includes('bug'), 'fix');
addIf(text.includes('refactor'), 'refactor');
addIf(text.includes('docs') || text.includes('documentation'), 'docs');
addIf(text.includes('test') || text.includes('testing'), 'test');
addIf(text.includes('ci') || text.includes('workflow'), 'ci');
addIf(text.includes('tool') || text.includes('script'), 'tooling');
addIf(text.includes('chore') || text.includes('cleanup'), 'chore');
// SemVer labels by explicit hints
addIf(text.includes('versioning:major') || text.includes('major'), 'versioning:major');
addIf(text.includes('versioning:minor') || text.includes('minor'), 'versioning:minor');
addIf(text.includes('versioning:patch') || text.includes('patch'), 'versioning:patch');
addIf(text.includes('versioning:none') || text.includes('no version'), 'versioning:none');
if (labels.size === 0) {
labels.add('versioning:none');
}
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.issue.number,
labels: Array.from(labels)
});