From 9c1118b06dd922a3239e3a2ad24adfcefd3e68c2 Mon Sep 17 00:00:00 2001 From: Ruihang Xia Date: Wed, 1 Mar 2023 15:16:21 +0800 Subject: [PATCH] ci: adjust title labeler's rule (#1079) * ci: adjust title labeler's rule Signed-off-by: Ruihang Xia * Apply suggestions from code review Co-authored-by: Yingwen --------- Signed-off-by: Ruihang Xia Co-authored-by: Yingwen --- .../pr-title-breaking-change-lable-config.json | 12 ++++++++++++ .github/pr-title-checker-config.json | 18 ++++++++++-------- .github/workflows/pr-title-checker.yml | 9 +++++++++ 3 files changed, 31 insertions(+), 8 deletions(-) create mode 100644 .github/pr-title-breaking-change-lable-config.json diff --git a/.github/pr-title-breaking-change-lable-config.json b/.github/pr-title-breaking-change-lable-config.json new file mode 100644 index 0000000000..6ab2db98ea --- /dev/null +++ b/.github/pr-title-breaking-change-lable-config.json @@ -0,0 +1,12 @@ +{ + "LABEL": { + "name": "breaking change", + "color": "D93F0B" + }, + "CHECKS": { + "regexp": "^.*\\!:.*", + "ignoreLabels": [ + "ignore-title" + ] + } +} diff --git a/.github/pr-title-checker-config.json b/.github/pr-title-checker-config.json index f270dc6717..e2276e3c1c 100644 --- a/.github/pr-title-checker-config.json +++ b/.github/pr-title-checker-config.json @@ -1,10 +1,12 @@ { - "LABEL": { - "name": "Invalid PR Title", - "color": "B60205" - }, - "CHECKS": { - "regexp": "^(feat|fix|test|refactor|chore|style|docs|perf|build|ci|revert)(\\(.*\\))?:.*", - "ignoreLabels" : ["ignore-title"] - } + "LABEL": { + "name": "Invalid PR Title", + "color": "B60205" + }, + "CHECKS": { + "regexp": "^(feat|fix|test|refactor|chore|style|docs|perf|build|ci|revert)(\\(.*\\))?\\!?:.*", + "ignoreLabels": [ + "ignore-title" + ] + } } diff --git a/.github/workflows/pr-title-checker.yml b/.github/workflows/pr-title-checker.yml index d683c847f4..9279a83ad1 100644 --- a/.github/workflows/pr-title-checker.yml +++ b/.github/workflows/pr-title-checker.yml @@ -18,3 +18,12 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} pass_on_octokit_error: false configuration_path: ".github/pr-title-checker-config.json" + breaking: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: thehanimo/pr-title-checker@v1.3.4 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + pass_on_octokit_error: false + configuration_path: ".github/pr-title-breaking-change-label-config.json"