diff options
author | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-10-19 21:21:36 +0200 |
---|---|---|
committer | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-10-19 21:49:06 +0200 |
commit | c7f6ee8c80fe66d27fca07d52eeb5145f0f00c82 (patch) | |
tree | 3c4d53a0cb7a479f9a3739f1803df0df9792e7c8 | |
parent | 67bb2c6a093ae7201e67061a390b949877abc3fc (diff) |
GitHub Actions: Fix pre-commit-pr job and disable useless hook
-rw-r--r-- | .github/workflows/pre-commit-pr.yml | 13 | ||||
-rw-r--r-- | .github/workflows/pre-commit.yml | 2 |
2 files changed, 10 insertions, 5 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 diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 69a3c39924..5280c801ad 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -16,4 +16,4 @@ jobs: # disable these checks for now when pushing directly (but still run these # on Pull Requests!). env: - SKIP: end-of-file-fixer,trailing-whitespace,clang-format,eslint + SKIP: end-of-file-fixer,trailing-whitespace,clang-format,eslint,no-commit-to-branch |