bug: build APK on CD workflow missing Java SDK #3
This file contains 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: Severity Labeler | |
on: | |
issues: | |
types: [opened] | |
jobs: | |
labeling: | |
name: Severity Labeling | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
steps: | |
- name: Run labeling script | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const issueCtx = context.payload.issue; | |
const hasBugLabel = issueCtx.labels.some((label) => (label.name === 'bug')); | |
const severityLabel = issueCtx.body.match(/severity-\d+/); | |
if (hasBugLabel && severityLabel) { | |
github.rest.issues.addLabels({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
labels: [severityLabel[0]] | |
}); | |
} |