24 lines
		
	
	
		
			549 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			549 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
| name: PR Title Check
 | |
| on:
 | |
|   pull_request:
 | |
|     types:
 | |
|       - opened
 | |
|       - edited
 | |
|       - synchronize
 | |
|       - reopened
 | |
| 
 | |
| jobs:
 | |
|   pr-title-check:
 | |
|     runs-on: ubuntu-latest
 | |
|     steps:
 | |
|       - name: Check PR title
 | |
|         run: |
 | |
|           title="${{ gitea.event.pull_request.title }}"
 | |
|           echo "Checking PR title: $title"
 | |
|           if [[ ! "$title" =~ ^(BLOG-[0-9]+|NO-ISSUE) [A-Z].+$ ]]; then
 | |
|             echo 'The title is not meet the format `BLOG-XXX Title title title`'
 | |
|             exit 1
 | |
|           else
 | |
|             echo 'Pass'
 | |
|           fi
 |