From 574f1d76926bb2b522c588163e5703a5c802d5a9 Mon Sep 17 00:00:00 2001 From: ming luo Date: Wed, 19 Jun 2024 22:00:38 -0400 Subject: [PATCH] ci pr-checker enforce meaningful pr title and description --- .github/workflows/pr-checker.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/pr-checker.yml diff --git a/.github/workflows/pr-checker.yml b/.github/workflows/pr-checker.yml new file mode 100644 index 000000000..3705715fe --- /dev/null +++ b/.github/workflows/pr-checker.yml @@ -0,0 +1,26 @@ +name: PR checker + +on: + pull_request: + types: [opened, edited, labeled, unlabeled, synchronize] + +jobs: + pr-checker: + name: Check PR description + runs-on: [ubuntu-latest] + steps: + - name: Run PR title check + uses: transferwise/actions-pr-checker@v3 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_TITLE_CONTAINS_PATTERN: ".{15,}" # Require at least 10 characters in the title + PR_COMMENT: | + Please provide a more meaningful PR title with at least 15 characters. + + - name: Run PR description check + uses: transferwise/actions-pr-checker@v3 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_CONTAINS_PATTERN: ".{25,}" # Require at least 10 characters in the description + PR_COMMENT: | + Please provide a more meaningful PR description with at least 25 characters.