File tree Expand file tree Collapse file tree 1 file changed +25
-5
lines changed
Expand file tree Collapse file tree 1 file changed +25
-5
lines changed Original file line number Diff line number Diff line change 1616 pull-requests : read
1717 runs-on : ubuntu-latest
1818 steps :
19- - name : Verifier action
20- id : verifier
21- uses : kubernetes-sigs/kubebuilder-release-tools@012269a88fa4c034a0acf1ba84c26b195c0dbab4 # tag=v0.4.3
22- with :
23- github_token : ${{ secrets.GITHUB_TOKEN }}
19+ - name : Checkout code
20+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2
21+
22+ - name : Validate PR Title Format
23+ run : |
24+ TITLE="${{ github.event.pull_request.title }}"
25+
26+ if [[ -z "$TITLE" ]]; then
27+ echo "Error: PR title cannot be empty."
28+ exit 1
29+ fi
30+
31+ if ! [[ "$TITLE" =~ ^($'\u26A0'|$'\u2728'|$'\U0001F41B'|$'\U0001F4D6'|$'\U0001F680'|$'\U0001F331') ]]; then
32+ echo "Error: Invalid PR title format."
33+ echo "Your PR title must start with one of the following indicators:"
34+ echo "- Breaking change: ⚠ (U+26A0)"
35+ echo "- Non-breaking feature: ✨ (U+2728)"
36+ echo "- Patch fix: 🐛 (U+1F41B)"
37+ echo "- Docs: 📖 (U+1F4D6)"
38+ echo "- Release: 🚀 (U+1F680)"
39+ echo "- Infra/Tests/Other: 🌱 (U+1F331)"
40+ exit 1
41+ fi
42+
43+ echo "PR title is valid: '$TITLE'"
You can’t perform that action at this time.
0 commit comments