Application crash when putting the computer to sleep/hibernation #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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, | |
| }); |