From 76c4e94da1e29075575709ca8eee61e50d353c9f Mon Sep 17 00:00:00 2001 From: Stephen Kitt Date: Thu, 20 Jan 2022 10:12:50 +0100 Subject: [PATCH] Check for fixup commits in PRs Commits produced using "git commit --fix" are great for review, but must be squashed before a PR is merged. Signed-off-by: Stephen Kitt --- .github/workflows/linting.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index e9a864a..92d5a2d 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -23,6 +23,14 @@ jobs: flags: 'i' error: 'Commits addressing code review feedback should typically be squashed into the commits under review' + - name: 'Verify no "fixup!" commits' + uses: tim-actions/commit-message-checker-with-regex@d6d9770051dd6460679d1cab1dcaa8cffc5c2bbd + with: + commits: ${{ steps.get-pr-commits.outputs.commits }} + pattern: '^(?!fixup!)' + flags: 'i' + error: 'Fixup commits should be squashed into the commits under review' + chart-testing: name: Helm Chart Linting runs-on: ubuntu-latest