Skip to content

BUG: Main Button, E-Brake and throttle became unresponsive #100

BUG: Main Button, E-Brake and throttle became unresponsive

BUG: Main Button, E-Brake and throttle became unresponsive #100

name: Issue Labeler for Dropdown
on:
issues:
types: [opened]
jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/github-script@v7
with:
script: |
const issueBody = context.payload.issue.body;
const shfwLabel = 'shfw';
const shutLabel = 'shut';
const criticalLabel = 'critical';
const highLabel = 'high';
const mediumLabel = 'medium';
const lowLabel = 'low';
let labelsToAdd = [];
if (issueBody.includes('Firmware (SHFW)')) {
labelsToAdd.push(shfwLabel);
}
if (issueBody.includes('Utility (SHUT)')) {
labelsToAdd.push(shutLabel);
}
if (issueBody.includes('low (asthetic, minor issue)')) {
labelsToAdd.push(lowLabel);
}
if (issueBody.includes('medium (affects usability but has a workaround)')) {
labelsToAdd.push(mediumLabel);
}
if (issueBody.includes('high (major functionality broken, no workaround)')) {
labelsToAdd.push(highLabel);
}
if (issueBody.includes('critical (app crash, data loss)')) {
labelsToAdd.push(criticalLabel);
}
if (issueBody.includes('low (take your time)')) {
labelsToAdd.push(lowLabel);
}
if (issueBody.includes('medium (upcoming releases)')) {
labelsToAdd.push(mediumLabel);
}
if (issueBody.includes('high (definitely next release)')) {
labelsToAdd.push(highLabel);
}
if (labelsToAdd.length > 0) {
github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.issue.number,
labels: labelsToAdd
});
}