summaryrefslogtreecommitdiffstats
path: root/.github/workflows/pre-commit-pr.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/pre-commit-pr.yml')
-rw-r--r--.github/workflows/pre-commit-pr.yml13
1 files changed, 9 insertions, 4 deletions
diff --git a/.github/workflows/pre-commit-pr.yml b/.github/workflows/pre-commit-pr.yml
index 4b54970533..00f35b7a96 100644
--- a/.github/workflows/pre-commit-pr.yml
+++ b/.github/workflows/pre-commit-pr.yml
@@ -4,14 +4,19 @@ on:
pull_request:
jobs:
- pre-commit:
+ pre-commit-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
+ with:
+ fetch-depth: 2
- uses: actions/setup-python@v2
- name: Install clang-format
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends clang-format-10
- uses: pre-commit/action@v2.0.0
- # HEAD is the not yet integrated PR merge commit +refs/pull/xxxx/merge
- # HEAD^1 is the PR target branch and HEAD^2 is the HEAD of the source branch
- extra_args: --from-ref HEAD^1 --to-ref HEAD
+ env:
+ SKIP: no-commit-to-branch
+ with:
+ # HEAD is the not yet integrated PR merge commit +refs/pull/xxxx/merge
+ # HEAD^1 is the PR target branch and HEAD^2 is the HEAD of the source branch
+ extra_args: --from-ref HEAD^1 --to-ref HEAD