Add logic

This commit is contained in:
Brett Logan 2022-02-21 11:16:27 -05:00
parent 86c82e43f7
commit 5f2fc46fcc
No known key found for this signature in database
GPG key ID: 52ED7D1F56850EE6

View file

@ -19,6 +19,7 @@ echo "Configuring Git..."
git config --global user.email "noreply@github.com" git config --global user.email "noreply@github.com"
git config --global user.name "Super-Linter Automation" git config --global user.name "Super-Linter Automation"
if [[ $(git status --porcelain) ]]; then
# Push changes to remote # Push changes to remote
echo "Pushing changes to remote..." echo "Pushing changes to remote..."
git add . git add .
@ -29,3 +30,6 @@ git push origin "npm_deps_${id}"
# Open pull request # Open pull request
echo "Opening pull request..." echo "Opening pull request..."
gh pr create --title "Weekly NPM Updates" --body "Updates NPM dependencies" --base master --head "npm_deps_${id}" gh pr create --title "Weekly NPM Updates" --body "Updates NPM dependencies" --base master --head "npm_deps_${id}"
else
echo "No changes to commit"
fi