From d48edfb6ca86090649ebfc4b40d433e36fae80a2 Mon Sep 17 00:00:00 2001 From: SquidSpirit Date: Mon, 20 Jan 2025 23:32:21 +0800 Subject: [PATCH] NO-ISSUE fix: if expression --- .gitea/workflows/pr-title-check.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/pr-title-check.yaml b/.gitea/workflows/pr-title-check.yaml index 3487895..2180d6f 100644 --- a/.gitea/workflows/pr-title-check.yaml +++ b/.gitea/workflows/pr-title-check.yaml @@ -1,5 +1,11 @@ name: PR Title Check -on: [pull_request] +on: + pull_request: + types: + - opened + - edited + - synchronize + - reopened jobs: pr-title-check: @@ -10,8 +16,8 @@ jobs: - name: Check PR title run: | - title=${{ gitea.event.pull_request.title }} - if [[ ! $title =~ ^(BLOG-[0-9]+|NO-ISSUE) [A-Z].+$ ]]; then + 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