PR #3 body compliance - synchronize - event 6 (run 30400929481) #6
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: Require no-mistakes | |
| run-name: "PR #${{ github.event.pull_request.number }} body compliance - ${{ github.event.action }} - event ${{ github.run_number }} (run ${{ github.run_id }})" | |
| on: | |
| pull_request: | |
| types: [opened, edited, synchronize, reopened] | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| # GitHub concurrency groups retain at most one pending run, replacing older | |
| # pending runs even when cancel-in-progress is false. Give body-bearing events | |
| # an immutable per-event group so first-time-fork approvals can never collapse | |
| # opened/edited checks. Keep synchronize/reopened coalescing as before. | |
| concurrency: | |
| group: no-mistakes-required-${{ github.event.pull_request.number }}-${{ (github.event.action == 'opened' || github.event.action == 'edited') && github.run_id || 'head-change' }} | |
| cancel-in-progress: true | |
| jobs: | |
| check: | |
| name: PR must be raised via no-mistakes | |
| runs-on: ubuntu-latest | |
| if: >- | |
| github.event.pull_request.user.login != 'github-actions[bot]' && | |
| github.event.pull_request.user.login != 'dependabot[bot]' | |
| steps: | |
| - name: Verify no-mistakes signature in PR body | |
| env: | |
| PR_BODY: ${{ github.event.pull_request.body }} | |
| PR_AUTHOR: ${{ github.event.pull_request.user.login }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| run: | | |
| set -eu | |
| marker='Updates from [git push no-mistakes](https://github.com/kunchenguid/no-mistakes)' | |
| if printf '%s' "${PR_BODY:-}" | grep -qF -- "$marker"; then | |
| echo "Found no-mistakes signature in PR #${PR_NUMBER} body." | |
| exit 0 | |
| fi | |
| { | |
| echo "::error::This PR was not raised through no-mistakes." | |
| echo | |
| echo "Contributions to this repository must be submitted via 'git push no-mistakes'." | |
| echo "That pipeline runs the required review/test/lint/CI steps and writes a" | |
| echo "deterministic '## Pipeline' section into the PR body containing:" | |
| echo | |
| echo " $marker" | |
| echo | |
| echo "See CONTRIBUTING.md for setup and the full workflow." | |
| echo | |
| echo "PR author: ${PR_AUTHOR}" | |
| } >&2 | |
| exit 1 |