feat: lemmas about step size iterators #36148
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: Check PR body for changelog convention | |
| on: | |
| merge_group: | |
| pull_request_target: | |
| types: [opened, synchronize, reopened, edited, labeled, converted_to_draft, ready_for_review] | |
| permissions: | |
| pull-requests: read | |
| jobs: | |
| check-pr-body: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check PR body | |
| if: github.event_name == 'pull_request_target' | |
| uses: actions/github-script@v8 | |
| with: | |
| # Safety note: this uses pull_request_target, so the workflow has elevated privileges. | |
| # The PR title and body are only used in regex tests (read-only string matching), | |
| # never interpolated into shell commands, eval'd, or written to GITHUB_ENV/GITHUB_OUTPUT. | |
| script: | | |
| const { title, body, labels, draft } = context.payload.pull_request; | |
| if (!draft && /^(feat|fix):/.test(title) && !labels.some(label => label.name == "changelog-no")) { | |
| if (!labels.some(label => label.name.startsWith("changelog-"))) { | |
| core.setFailed('feat/fix PR must have a `changelog-*` label'); | |
| } | |
| if (!/^This PR [^<]/.test(body)) { | |
| core.setFailed('feat/fix PR must have changelog summary starting with "This PR ..." as first line.'); | |
| } | |
| } |