From 0d152a86ce5728d66d1faf98c7a55220839a9ccc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 8 Jan 2021 09:55:18 +0100 Subject: [PATCH] Add pull_request workflow --- .github/workflows/pull_request.yml | 35 ++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/pull_request.yml diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 0000000000..03fc8844fc --- /dev/null +++ b/.github/workflows/pull_request.yml @@ -0,0 +1,35 @@ +name: Pull Requests + +on: + pull_request: + types: + - opened + - edited + - reopened + - synchronize + - ready_for_review + - review_requested + +jobs: + commit_message: + name: Check Commit Message + runs-on: ubuntu-latest + steps: + - name: Check for GitHub's default message. + uses: gsactions/commit-message-checker@c61c81192182bbc0d5e41b4796e3b71684228c77 + with: + pattern: '^(?!Update\s+\S*$).*$' + error: 'Please use a meaningful commit message.' + excludeDescription: 'true' + excludeTitle: 'true' + checkAllCommitMessages: 'true' + accessToken: ${{ secrets.GITHUB_TOKEN }} + - name: Check for unsquashed `fixup!` commits. + uses: gsactions/commit-message-checker@c61c81192182bbc0d5e41b4796e3b71684228c77 + with: + pattern: '^(?!fixup!(\s|$))' + error: 'A `fixup!` commit was found.' + excludeDescription: 'true' + excludeTitle: 'true' + checkAllCommitMessages: 'true' + accessToken: ${{ secrets.GITHUB_TOKEN }} -- 2.20.1