Skip to content

Commit

Permalink
Merge pull request #95 from nobbi1991/dev
Browse files Browse the repository at this point in the history
bumped version
  • Loading branch information
nobbi1991 authored Nov 29, 2024
2 parents 70a5fff + 200eb26 commit a4ce37f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/update_pre_commit_hooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,20 @@ jobs:
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
- name: Create branch and push updates
# Create a new branch and push updates (if the branch does not exist)
- name: Check for changes and push updates
# Check for changes and push updates only if there are changes
run: |
# Check if the branch exists, if not, create it
git fetch origin
# Check if there are any changes to commit
git diff --exit-code
if [ $? -eq 0 ]; then
echo "No changes detected, skipping commit."
exit 0 # No changes, so skip the commit step
fi
# If changes are detected, continue with committing and pushing
BRANCH_NAME="pre-commit-updates"
git fetch origin
if git rev-parse --verify origin/$BRANCH_NAME; then
echo "Branch $BRANCH_NAME exists, switching to it."
git checkout $BRANCH_NAME
Expand All @@ -47,9 +54,7 @@ jobs:
git checkout -b $BRANCH_NAME
fi
# Add the updated .pre-commit-config.yaml file and commit changes
# Commit and push changes
git add .pre-commit-config.yaml
git commit -m 'Update pre-commit hook versions'
# Push the changes to the branch
git push -u origin $BRANCH_NAME
2 changes: 1 addition & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ hatch-requirements-txt~=0.4.1
hatch~=1.13.0
pre-commit~=4.0.1
pytest~=8.3.3
ruff~=0.8.0
ruff~=0.8.1

0 comments on commit a4ce37f

Please sign in to comment.