feat: implement scorecard-classic command #3275
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 Check | |
| on: | |
| pull_request: | |
| types: [opened, edited, synchronize, reopened] | |
| jobs: | |
| check-pr-title: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check PR title | |
| env: | |
| PR_TITLE: ${{ github.event.pull_request.title }} | |
| run: | | |
| if ! echo "$PR_TITLE" | grep -E "^(fix|feat|chore|docs)(\([a-z-]+\))?(\!)?: (🔖 |🧪 )?[a-z].+[^.]$"; then | |
| echo "❌ PR title '$PR_TITLE' does not match the required format" | |
| echo "Required format: type(scope): subject" | |
| echo "Examples:" | |
| echo " feat: add new feature" | |
| echo " fix(core): fix bug" | |
| echo " docs: update README" | |
| echo " chore!: breaking change" | |
| exit 1 | |
| fi | |
| echo "✅ PR title format is valid" |