ci: add fixup check to Github Actions

pull/1488/head
Tomas Susanka 3 years ago
parent c42850f997
commit 8955d04b5e

@ -0,0 +1,11 @@
name: Git Checks
on: [pull_request]
jobs:
block-fixup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.0.0
- name: Block Fixup Commit Merge
uses: 13rac1/block-fixup-merge-action@v2.0.0

@ -1,12 +0,0 @@
#!/usr/bin/env bash
git fetch origin master:master # on CIs it is common to fetch only the current branch
messages=$(git log --format=%s master..) # commit messages between this branch and master
if [[ $messages =~ "fixup!" ]]; then
echo 'Failure: Some commit message contains "fixup!" string.'
exit 1
else
echo 'Success: No commit messages containing "fixup!" string.'
fi
Loading…
Cancel
Save