Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 0 additions & 70 deletions .github/workflows/pr-verify.yml

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/verifier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "PR Title Verifier"

on:
pull_request:
types: [opened, edited, synchronize, reopened]

permissions: {}

jobs:
verify:
permissions:
contents: read
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Validate PR Title Format
env:
TITLE: ${{ github.event.pull_request.title }}
run: |
if [[ -z "$TITLE" ]]; then
echo "Error: PR title cannot be empty."
exit 1
fi

if ! [[ "$TITLE" =~ ^($'\u26A0'|$'\u2728'|$'\U0001F41B'|$'\U0001F4D6'|$'\U0001F680'|$'\U0001F331') ]]; then
echo "Error: Invalid PR title format."
echo "Your PR title must start with one of the following indicators:"
echo "- Breaking change: ⚠ (U+26A0)"
echo "- Non-breaking feature: ✨ (U+2728)"
echo "- Patch fix: 🐛 (U+1F41B)"
echo "- Docs: 📖 (U+1F4D6)"
echo "- Release: 🚀 (U+1F680)"
echo "- Infra/Tests/Other: 🌱 (U+1F331)"
exit 1
fi

echo "PR title is valid: '$TITLE'"
Loading