Skip to content

Application crash when putting the computer to sleep/hibernation #10

Application crash when putting the computer to sleep/hibernation

Application crash when putting the computer to sleep/hibernation #10

name: Label Issue Platform
on:
issues:
types: [opened]
jobs:
label-platform:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Add platform labels
uses: actions/github-script@v7
with:
script: |
const body = context.payload.issue.body || '';
// Issue forms render dropdown answers as:
// ### Platform
//
// macOS / iOS / Both
const match = body.match(/###\s+Platform\s*\n+([^\n#]+)/);
if (!match) return;
const platform = match[1].trim().toLowerCase();
const labels = [];
if (platform === 'macos' || platform === 'both') labels.push('macos');
if (platform === 'ios' || platform === 'both') labels.push('ios');
if (labels.length === 0) return;
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels,
});