-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
To remove trailing whitespace and let files end on one empty line.
- Loading branch information
Showing
1 changed file
with
7 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,21 +27,17 @@ jobs: | |
- name: Run pre-commit hooks to fix issues | ||
id: pre-commit | ||
run: | | ||
# Run pre-commit hooks | ||
pre-commit run --all-files --hook-stage=manual || true | ||
git config user.name "github-actions" | ||
git config user.email "[email protected]" | ||
# Stage all changes | ||
git add . | ||
# Check for changes | ||
git status | ||
git diff --cached | ||
# Add and commit changes if there are any | ||
if ! git diff --cached --quiet; then | ||
git add . | ||
git commit -m "Fix whitespace issues" | ||
else | ||
# Commit changes if there are any | ||
if git diff --cached --quiet; then | ||
echo "No changes to commit" | ||
else | ||
git commit -m "Fix whitespace issues" || echo "No changes to commit" | ||
fi | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|