Skip to content

Commit

Permalink
Improve pre-commit logic
Browse files Browse the repository at this point in the history
  • Loading branch information
camposandro committed Feb 13, 2024
1 parent 34358f1 commit 0f94559
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# This workflow runs pre-commit hooks on pull requests to enforce coding style.
# To ensure correct configuration, please refer to:
# https://lincc-ppt.readthedocs.io/en/latest/practices/ci_precommit.html

# This workflow runs pre-commit hooks on pushes and pull requests to main
# to enforce coding style. To ensure correct configuration, please refer to:
# https://lincc-ppt.readthedocs.io/en/latest/practices/ci_precommit.html
name: Run pre-commit hooks

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
pre-commit-ci:
Expand All @@ -30,4 +32,4 @@ jobs:
env:
SKIP: "check-lincc-frameworks-template-version,no-commit-to-branch,check-added-large-files,validate-pyproject,sphinx-build,pytest-check"
- uses: pre-commit-ci/[email protected]
if: always()
if: failure() && github.event_name == 'pull_request' && github.event.pull_request.draft == false

0 comments on commit 0f94559

Please sign in to comment.