From a8782430d952c683fe2df8cbb5e20ddee908d850 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 | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/pr-title-check.yaml b/.gitea/workflows/pr-title-check.yaml index 3487895..b85acef 100644 --- a/.gitea/workflows/pr-title-check.yaml +++ b/.gitea/workflows/pr-title-check.yaml @@ -1,17 +1,20 @@ name: PR Title Check -on: [pull_request] +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 + 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