Skip to content

🎉Server client #1669

🎉Server client

🎉Server client #1669

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