Skip to content

Commit

Permalink
Merge pull request #46 from linusboehm/git_workflow_lint_suggestions
Browse files Browse the repository at this point in the history
feat: add automatic linting suggestion github workflow
  • Loading branch information
bretbrownjr authored Oct 17, 2024
2 parents 168ea2b + a7e1a0f commit 1ba4f15
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 1ba4f15

Please sign in to comment.