Skip to content

Commit

Permalink
Create reusable-semantic-pull-request.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
galargh authored Feb 18, 2025
1 parent d920b4c commit 1232313
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/reusable-semantic-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "Semantic PR"

on:
workflow_call:

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@b6bca70dcd3e56e896605356ce09b76f7e1e0d39 # v5.1.0
env:
GITHUB_TOKEN: ${{ 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 1232313

Please sign in to comment.