NO-ISSUE Create title check workflow (#30)
All checks were successful
Frontend CI / build (push) Successful in 1m20s
All checks were successful
Frontend CI / build (push) Successful in 1m20s
### Description - The validation regex is `^(BLOG-[0-9]+|NO-ISSUE) [A-Z].+$` ### Package Changes _No response_ ### Screenshots _No response_ ### Reference _No issue_ ### Checklist - [x] The title is meet the format `'BLOG-XXX Title title title'` - [ ] A milestone is set - [ ] The related issuse has been linked to this branch Reviewed-on: #30 Co-authored-by: SquidSpirit <squid@squidspirit.com> Co-committed-by: SquidSpirit <squid@squidspirit.com>
This commit is contained in:
parent
15d1bcb823
commit
fd3ba3bfb8
@ -33,6 +33,5 @@ body:
|
||||
attributes:
|
||||
label: Checklist
|
||||
options:
|
||||
- label: "The title is meet the format `'BLOG-XXX Title title title'`"
|
||||
- label: A milestone is set
|
||||
- label: The related issuse has been linked to this branch
|
||||
|
20
.gitea/workflows/pr-title-check.yaml
Normal file
20
.gitea/workflows/pr-title-check.yaml
Normal file
@ -0,0 +1,20 @@
|
||||
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"
|
||||
echo "$title" | grep -qE '^(BLOG-[0-9]+|NO-ISSUE) [A-Z].+$' \
|
||||
&& echo 'Pass' \
|
||||
|| (echo 'The title is not meet the format `BLOG-XXX Title title title`'; exit 1)
|
Loading…
x
Reference in New Issue
Block a user