From aad6308f7a92ac4d7595bdd39906094782f10aa9 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 16 Jul 2022 07:25:24 +0200 Subject: [PATCH] Add check for pull requests (GitHub action) Signed-off-by: Stefan Weil --- .github/workflows/pr_check.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/pr_check.yml diff --git a/.github/workflows/pr_check.yml b/.github/workflows/pr_check.yml new file mode 100644 index 0000000000..22e97bdbb1 --- /dev/null +++ b/.github/workflows/pr_check.yml @@ -0,0 +1,21 @@ +# Check pull requests. + +name: Check pull request + +# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows +on: + # Trigger workflow on pull request. + pull_request: + # branches: [ ci ] + +jobs: + check_pull_request: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Show whitespace issues. + run: git log --check ${{github.event.pull_request.base.sha}^}... + - name: Check for whitespace issues. + run: git log --check ${{github.event.pull_request.base.sha}}... | grep "^[^:+]*:[0-9]*:" + # TODO: Add more checks here (codespell, ...).