🎉Server client #1669
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 Checker | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| on: | |
| pull_request: | |
| types: [opened, edited, synchronize, reopened] | |
| jobs: | |
| check-title: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Check PR title format | |
| run: | | |
| PR_TITLE="${{ github.event.pull_request.title }}" | |
| echo "Checking PR title: $PR_TITLE" | |
| # Define the allowed emojis using Unicode characters | |
| VALID_EMOJIS="🐛|📄|🎉|🚀|♻️|📦|:bug:|:page_facing_up:|:tada:|:rocket:|:recycle:|:package:" | |
| # Check if the PR title starts with one of the valid emojis | |
| if [[ ! "$PR_TITLE" =~ ^[[:space:]]*($VALID_EMOJIS) ]]; then | |
| echo "PR title must start with one of the accepted emojis: 🐛, 📄, 🎉, 🚀, ♻️, 📦 or their aliases." | |
| exit 1 | |
| else | |
| echo "PR title format is correct." | |
| fi |