fix: add rate limiting, backoff, and AUP compliance #5
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 | |
| on: | |
| pull_request: | |
| types: [opened, edited, synchronize, reopened] | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| check-pr-title: | |
| name: Check PR Title | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Check conventional commit title | |
| run: | | |
| title="${{ github.event.pull_request.title }}" | |
| if ! echo "$title" | grep -qP '^(\p{So} )?(feat|fix|docs|chore|ci|refactor|test|perf|build|style|revert)(\(.+\))?!?: .+'; then | |
| echo "::error::PR title must follow: [emoji] type: description" | |
| echo "Valid types: feat, fix, docs, chore, ci, refactor, test, perf, build, style, revert" | |
| echo "Examples: '✨ feat: Add new feature' or 'fix: Correct bug'" | |
| exit 1 | |
| fi |