From f4beb731d838b211f44bce03d1c6c214cae6103b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Wed, 28 Jun 2023 01:22:16 +0800 Subject: [PATCH] workflow: optimize pr check --- .github/workflows/pr-check-title.yml | 11 +++++++++++ .github/workflows/pr-check.yml | 12 ------------ 2 files changed, 11 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/pr-check-title.yml delete mode 100644 .github/workflows/pr-check.yml diff --git a/.github/workflows/pr-check-title.yml b/.github/workflows/pr-check-title.yml new file mode 100644 index 00000000..bbe6b7a1 --- /dev/null +++ b/.github/workflows/pr-check-title.yml @@ -0,0 +1,11 @@ +name: PR Check Title +on: + pull_request: +jobs: + pr-check-title: + runs-on: ubuntu-latest + steps: + - uses: Slashgear/action-check-pr-title@v4.3.0 + with: + regexp: "^(.+)(?:(([^)s]+)))?: .{1,50}|Merge .{1,50})" + helpMessage: "Your PR title is invalid. Please follow the Conventional Commits specification: https://www.conventionalcommits.org/zh-hans/v1.0.0/" diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml deleted file mode 100644 index 0a07bba1..00000000 --- a/.github/workflows/pr-check.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: PR Check - -on: - pull_request: - -jobs: - check-for-cc: - runs-on: ubuntu-latest - steps: - - name: check-for-cc - id: check-for-cc - uses: agenthunt/conventional-commit-checker-action@v2.0.0