Skip creating of branch and PR if no changes from PHP CS Fixer (#7348)

This commit is contained in:
Yuriy Bakhtin 2024-12-16 11:05:41 +01:00 committed by GitHub
parent 89b6068fe1
commit 7663a81c16
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -45,6 +45,10 @@ jobs:
run: |
git config user.name "GitHub Action"
git config user.email "action@github.com"
if git diff --quiet; then
echo "No changes detected by PHP-CS-Fixer. Skipping commit and PR creation."
exit 0
fi
PHP_FIXER_DATETIME=$(date +%Y-%m-%d-%H%M%S)
git checkout -b "php-fixer/$PHP_FIXER_DATETIME"
git add -u