duan8/.github/workflows/pre-commit.yml
Wang Xinyu a5f84f6103
pre-commit check and contribution doc (#1459)
* remove blank

* Update pre-commit.yml

* Update pre-commit.yml

* code style

* add contribution.md

* add contribution.md
2024-03-20 11:13:45 +08:00

20 lines
441 B
YAML

name: pre-commit
on:
pull_request:
push:
branches: [master]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# grab the history of the PR
fetch-depth: 0
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.1
with:
extra_args: --from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}