Skip to content

Commit

Permalink
chore: Update .github/workflows/semantic-pull-request.yml [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
libp2p-mgmt-read-write[bot] authored Mar 2, 2023
1 parent 1a16353 commit 4910160
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/semantic-pull-request.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4910160

Please sign in to comment.