High RAM Usage / System Crash when Dashboard Refreshes #4
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 Issues | |
| on: | |
| issues: | |
| types: [opened] | |
| jobs: | |
| label: | |
| name: Apply template label | |
| runs-on: ubuntu-latest | |
| permissions: | |
| issues: write | |
| steps: | |
| - name: Validate issue is not blank | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const body = context.payload.issue.body || ''; | |
| // Detect if reporter skipped the template entirely | |
| if (body.trim().length < 50) { | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.payload.issue.number, | |
| body: [ | |
| '👋 Thanks for opening an issue!', | |
| '', | |
| 'This issue appears to be missing key details. Please edit it to fill out the template — especially:', | |
| '- **Steps to Reproduce** (numbered, one action per step)', | |
| '- **Expected vs Actual Behaviour**', | |
| '- **Environment** (dashboard version, Python version, OS)', | |
| '', | |
| 'Issues without reproduction steps are hard to diagnose and may be closed.', | |
| ].join('\n'), | |
| }); | |
| await github.rest.issues.addLabels({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.payload.issue.number, | |
| labels: ['needs-info'], | |
| }); | |
| } |