From 4910160bea49dc6fe890be260e20339952bde35f Mon Sep 17 00:00:00 2001 From: "libp2p-mgmt-read-write[bot]" <104492852+libp2p-mgmt-read-write[bot]@users.noreply.github.com> Date: Thu, 2 Mar 2023 09:50:32 +0000 Subject: [PATCH] chore: Update .github/workflows/semantic-pull-request.yml [skip ci] --- .github/workflows/semantic-pull-request.yml | 40 +++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/semantic-pull-request.yml diff --git a/.github/workflows/semantic-pull-request.yml b/.github/workflows/semantic-pull-request.yml new file mode 100644 index 00000000000..0324e0bd422 --- /dev/null +++ b/.github/workflows/semantic-pull-request.yml @@ -0,0 +1,40 @@ +name: "Semantic PR" + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +jobs: + main: + name: Validate PR title + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@01d5fd8a8ebb9aafe902c40c53f0f4744f7381eb # v5.0.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + # Configure which types are allowed (newline delimited). + types: | + feat + fix + chore + docs + deps + test + refactor + ci + requireScope: false + + - name: Check PR title length + env: + TITLE: ${{ github.event.pull_request.title }} + run: | + title_length=${#TITLE} + if [ $title_length -gt 72 ] + then + echo "PR title is too long (greater than 72 characters)" + exit 1 + fi