fix(datastructures): extend_header_value only reads the first duplicate header entry, dropping the rest #7951
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: "Lint PR Title" | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - edited | |
| - synchronize | |
| jobs: | |
| main: | |
| name: Validate PR title | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| const title = context.payload.pull_request.title; | |
| const types = [ | |
| "build", | |
| "chore", | |
| "ci", | |
| "docs", | |
| "feat", | |
| "fix", | |
| "perf", | |
| "refactor", | |
| "revert", | |
| "style", | |
| "test", | |
| ]; | |
| const pattern = new RegExp(`^(${types.join("|")})(\\([^)]+\\))?!?: .+`); | |
| if (!pattern.test(title)) { | |
| core.setFailed( | |
| `PR title ${JSON.stringify(title)} is not a valid Conventional Commit.\n\n` + | |
| `Expected format: <type>(<optional scope>): <subject>\n` + | |
| `Allowed types: ${types.join(", ")}\n\n` | |
| ); | |
| return; | |
| } | |
| console.log(`PR title ${JSON.stringify(title)} is valid.`); |