fix: [#967] Restore trusted keyword with auto-wrap semantics #278
Workflow file for this run
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: PR Labeler | |
| on: | |
| pull_request: | |
| types: [opened, edited] | |
| jobs: | |
| label: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - name: Label PR from conventional commit prefix | |
| uses: actions/github-script@v8 | |
| with: | |
| script: | | |
| const title = context.payload.pull_request.title; | |
| const labels = []; | |
| if (title.startsWith('feat:') || title.startsWith('feat(')) labels.push('feat'); | |
| else if (title.startsWith('fix:') || title.startsWith('fix(')) labels.push('fix'); | |
| else if (title.startsWith('chore:') || title.startsWith('chore(')) labels.push('chore'); | |
| else if (title.startsWith('test:') || title.startsWith('test(')) labels.push('test'); | |
| if (labels.length > 0) { | |
| await github.rest.issues.addLabels({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.payload.pull_request.number, | |
| labels, | |
| }); | |
| } |