blog/.gitea/workflows/pr-title-check.yaml
SquidSpirit d48edfb6ca
Some checks failed
Frontend CI / build (push) Has been cancelled
PR Title Check / pr-title-check (pull_request) Failing after 16s
NO-ISSUE fix: if expression
2025-01-20 23:36:54 +08:00

26 lines
566 B
YAML

name: PR Title Check
on:
pull_request:
types:
- opened
- edited
- synchronize
- reopened
jobs:
pr-title-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check PR title
run: |
title="${{ gitea.event.pull_request.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