Skip to content

News page

News page #359

name: PR Title Format Check
on:
pull_request:
types:
- opened
- synchronize
jobs:
pr-title-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Check PR Title
run: |
pr_title="${{ github.event.pull_request.title }}"
regex="^:[^\s]+: .+( #[0-9]+)?$"
if [[ ! "$pr_title" =~ $regex ]]; then
echo "error::PR title does not match the required format: <emoji> <description> and optional <reference-number>"
exit 1
fi