Skip to content

Updated comment

Updated comment #51

Workflow file for this run

name: Auto-format with Black
on: [push, pull_request_target ]
jobs:
auto-format:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v3
with:
repository: HydroAnalyser/hydro-analyzer
token: ${{ secrets.TOKEN }}
ref: ${{ github.ref }}
- name: Install Black
run: pip install black
- name: Auto-format with Black
run: black .
- name: Commit changes
run: |
if [[ -n $(git status -s) ]]; then
git config --global user.name 'GitHub Actions'
git config --global user.email 'github-actions@users.noreply.github.com'
git add .
git commit -m "Auto-format with Black"
git push
else
echo "No changes to commit"
fi