Device Reconnected reported in notification as event rather than in Device Reconnected #156
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 by Installation Type | |
| on: | |
| issues: | |
| types: [opened] | |
| permissions: | |
| issues: write | |
| jobs: | |
| add-label: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Get issue content | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const body = context.payload.issue.body; | |
| const lowerBody = body.toLowerCase(); | |
| let labelsToAdd = []; | |
| if (lowerBody.includes('bare-metal')) { | |
| labelsToAdd.push('bare-metal ❗'); | |
| } | |
| if (lowerBody.includes('home assistant')) { | |
| labelsToAdd.push('Home Assistant 🏠'); | |
| } | |
| if (lowerBody.includes('production (netalertx)') || lowerBody.includes('dev (netalertx-dev)')) { | |
| labelsToAdd.push('Docker 🐋'); | |
| } | |
| if (labelsToAdd.length > 0) { | |
| await github.rest.issues.addLabels({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| labels: labelsToAdd | |
| }); | |
| } |