From 7e9fe0e9a29ae24a7b075f6efc0291512415d8e6 Mon Sep 17 00:00:00 2001 From: Xunzhuo Date: Tue, 3 May 2022 03:46:12 +0800 Subject: [PATCH] feat: replace pr title validator Signed-off-by: Xunzhuo --- .github/pr-title-checker-config.json | 34 -------------------------- .github/workflows/pr-title-checker.yml | 20 ++++++++++++--- 2 files changed, 16 insertions(+), 38 deletions(-) delete mode 100644 .github/pr-title-checker-config.json diff --git a/.github/pr-title-checker-config.json b/.github/pr-title-checker-config.json deleted file mode 100644 index 1449dd78e6..0000000000 --- a/.github/pr-title-checker-config.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "LABEL": { - "name": "title needs formatting", - "color": "EEEEEE" - }, - "CHECKS": { - "prefixes": [ - "fix", - "feat", - "feature", - "docs", - "ci", - "chore", - "test", - "revert", - "style", - "refactor", - "sync", - "perf", - "merge" - ], - "regexp": "docs\\(v[0-9]\\): ", - "regexpFlags": "i", - "ignoreLabels": [ - "dont-check-PRs-with-this-label", - "meta" - ] - }, - "MESSAGES": { - "success": "All OK", - "failure": "Failing CI PR title check", - "notice": "" - } -} \ No newline at end of file diff --git a/.github/workflows/pr-title-checker.yml b/.github/workflows/pr-title-checker.yml index e3ce0d2377..ecccea39d1 100644 --- a/.github/workflows/pr-title-checker.yml +++ b/.github/workflows/pr-title-checker.yml @@ -14,8 +14,20 @@ jobs: name: "🍀 Title Validation" runs-on: ubuntu-latest steps: - - uses: thehanimo/pr-title-checker@v1.3.4 - with: + - uses: amannn/action-semantic-pull-request@v2.1.0 + env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - pass_on_octokit_error: false - configuration_path: ".github/pr-title-checker-config.json" + with: + # If the PR contains one of these labels, the validation is skipped. + # Multiple labels can be separated by newlines. + # If you want to rerun the validation when labels change, you might want + # to use the `labeled` and `unlabeled` event triggers in your workflow. + ignoreLabels: | + dont-check-PRs-with-this-label + # For work-in-progress PRs you can typically use draft pull requests + # from GitHub. However, private repositories on the free plan don't have + # this option and therefore this action allows you to opt-in to using the + # special "[WIP]" prefix to indicate this state. This will avoid the + # validation of the PR title and the pull request checks remain pending. + # Note that a second check will be reported if this is enabled. + wip: true