build(deps): bump requests from 2.32.3 to 2.33.1 #569
This file contains hidden or 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
| name: Black | |
| on: [push, pull_request] | |
| jobs: | |
| Check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v3 | |
| - name: Setup dependencies | |
| run: pip install black | |
| - name: Run Black | |
| run: black --check . | |
| Fix: | |
| needs: Check | |
| if: ${{ !success() || cancelled() }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| token: ${{ secrets.SECRET_TOKEN }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v3 | |
| - name: Setup dependencies | |
| run: pip install black | |
| - name: Blacken python files | |
| run: black . | |
| - name: Commit & Push | |
| run: | | |
| git config user.name github-actions | |
| git config user.email github-actions@github.com | |
| git commit --all -m "[bot] autoformat python files using black" | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v3 | |
| with: | |
| token: ${{ secrets.SECRET_TOKEN }} | |
| branch: black/blacken-${{ github.ref }} | |
| delete-branch: true | |
| title: "Python files autoformatted using black" | |
| body: "Some formatting changes are needed" | |