-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ncullen93
committed
Feb 16, 2024
1 parent
9c16fb3
commit c188e6a
Showing
2 changed files
with
24 additions
and
10 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: autopep8 | ||
on: pull_request | ||
jobs: | ||
autopep8: | ||
# Check if the PR is not from a fork | ||
if: github.event.pull_request.head.repo.full_name == github.repository | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.REPO_ACCESS_TOKEN }} | ||
ref: ${{ github.head_ref }} | ||
- name: autopep8 | ||
id: autopep8 | ||
uses: peter-evans/autopep8@v2 | ||
with: | ||
args: --exit-code --recursive --in-place --aggressive --aggressive . | ||
- name: Commit autopep8 changes | ||
if: steps.autopep8.outputs.exit-code == 2 | ||
run: | | ||
git config --global user.name 'Peter Evans' | ||
git config --global user.email '[email protected]' | ||
git commit -am "Automated autopep8 fixes" | ||
git push |