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, ...).