chore(deps): bump the go-dependencies group in /integrationtests with 5 updates #229
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, synchronize] | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| label: | |
| name: Label PR based on type | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Label PR based on title | |
| uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const title = context.payload.pull_request.title.toLowerCase(); | |
| const labels = []; | |
| // Determine type based on conventional commit format | |
| if (title.startsWith('feat')) { | |
| labels.push('type: feature'); | |
| } else if (title.startsWith('fix')) { | |
| labels.push('type: bug'); | |
| } else if (title.startsWith('docs')) { | |
| labels.push('type: documentation'); | |
| } else if (title.match(/^(build|chore|ci|perf|refactor|revert|style|test)/)) { | |
| labels.push('type: maintenance'); | |
| } | |
| // Check for breaking changes | |
| if (title.includes('!:') || title.includes('breaking')) { | |
| labels.push('type: breaking'); | |
| } | |
| // Add labels if any were determined | |
| if (labels.length > 0) { | |
| await github.rest.issues.addLabels({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| labels: labels | |
| }); | |
| } |