Repository navigation
ci: auto-merge the tap bump PR and tolerate aligned formula keys #7
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 title | |
| # Squash merging makes the PR title the commit subject on main, and release.yml | |
| # picks the version from those subjects, so the title must be a conventional commit. | |
| on: | |
| pull_request: | |
| types: [opened, edited, reopened, synchronize] | |
| permissions: {} | |
| jobs: | |
| conventional-title: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check the title is a conventional commit | |
| env: | |
| TITLE: ${{ github.event.pull_request.title }} | |
| run: | | |
| set -euo pipefail | |
| TYPES='feat|fix|perf|refactor|docs|test|build|ci|chore|revert|style' | |
| if grep -qE "^(${TYPES})(\([a-z0-9._/-]+\))?!?: [^[:space:]]" <<<"$TITLE"; then | |
| echo "Conventional: $TITLE" | |
| else | |
| echo "::error title=PR title is not a conventional commit::Use '<type>[(scope)][!]: <summary>' with type one of ${TYPES//|/, }. feat releases a minor, fix and perf a patch, and '!' a major; other types don't release." | |
| exit 1 | |
| fi |