Skip to content

fix!: Correct the speed in and outputs of the base class for turbine, generator and grid #7

fix!: Correct the speed in and outputs of the base class for turbine, generator and grid

fix!: Correct the speed in and outputs of the base class for turbine, generator and grid #7

Workflow file for this run

name: Label PRs from Conventional Commits
on:
pull_request:
types: [opened, edited, reopened]
permissions:
issues: write
pull-requests: write
jobs:
label:
runs-on: ubuntu-latest
steps:
- name: Label PR based on title
uses: actions/github-script@v7
with:
script: |
const title = context.payload.pull_request.title.toLowerCase();
const labels = [];
// Check for breaking change indicator (!)
if (title.includes('!:') || title.match(/!\([^)]+\):/)) {
labels.push('breaking');
}
// Match conventional commit types
if (title.startsWith('feat') || title.includes('feature')) {
labels.push('feat');
} else if (title.startsWith('fix')) {
labels.push('fix');
} else if (title.startsWith('docs')) {
labels.push('docs');
} else if (title.startsWith('refactor')) {
labels.push('refactor');
} else if (title.startsWith('perf')) {
labels.push('perf');
} else if (title.startsWith('test')) {
labels.push('test');
} else if (title.startsWith('build')) {
labels.push('build');
} else if (title.startsWith('ci')) {
labels.push('ci');
} else if (title.startsWith('chore')) {
labels.push('chore');
} else if (title.startsWith('style')) {
labels.push('style');
} else if (title.startsWith('revert')) {
labels.push('revert');
}
// Add labels if any were identified
if (labels.length > 0) {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
labels: labels
});
console.log(`Added labels: ${labels.join(', ')}`);
}