chore: add check development commit runner

This commit is contained in:
ronaldo-mf 2026-07-06 17:57:08 -03:00
parent 5534a0b1b3
commit da90ff3cfd

View file

@ -0,0 +1,22 @@
name: Check Squash Development
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Verificar quantidade de commits
run: |
# Conta quantos commits existem na branch do PR em relação à base
COUNT=$(git rev-list --count HEAD ^origin/development)
if [ "$COUNT" -gt 1 ]; then
echo "Atenção: O PR contém $COUNT commits. Por favor, faça squash para manter 1 único commit."
exit 1
else
echo "Histórico limpo! 1 commit detectado."
fi