Whitespace from different user #16
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
name: Pre-commit CI | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, closed] | |
issue_comment: | |
types: [created] | |
jobs: | |
main: | |
name: "Pre-commit checks" | |
if: github.event_name == 'pull_request' || (github.event_name == 'issue_comment' && contains(github.event.comment.body, '/autofixme!')) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- name: Install pre-commit | |
run: pip install pre-commit | |
- name: Run pre-commit | |
run: pre-commit run --all-files --show-diff-on-failure | |
- name: Modify event_name | |
if: github.event_name == 'issue_comment' && contains(github.event.comment.body, '/autofixme!') | |
run: | | |
sed -i 's/event_name: issue_comment/event_name: pull_request/' pre-commit.yml | |
- name: Run pre-commit-ci-lite | |
uses: pre-commit-ci/lite-action@v1.0.2 | |
if: always() |