Skip to content

Commit

Permalink
feat: add automatic linting suggestion github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
linusboehm committed Oct 17, 2024
1 parent bd7ad35 commit a7e1a0f
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,25 @@ on:
jobs:
pre-commit:
runs-on: ubuntu-latest
name: pre-commit
permissions:
contents: read
pull-requests: write

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.13

- name: Cache pre-commit hooks
uses: actions/cache@v2
with:
python-version: '3.13'
path: ~/.cache/pre-commit
key: ${{ runner.os }}-precommit-${{ hashFiles('.pre-commit-config.yaml') }}

- name: Get Changed Files
id: changed-files
Expand All @@ -22,3 +36,11 @@ jobs:
- uses: pre-commit/[email protected]
with:
extra_args: --files ${{ steps.changed-files.outputs.all_changed_files }}
continue-on-error: true

- name: suggester / pre-commit
uses: reviewdog/action-suggester@v1
with:
tool_name: pre-commit
fail_on_error: true
level: warning

0 comments on commit a7e1a0f

Please sign in to comment.