diff --git a/.github/scripts/contrib.sh b/.github/scripts/contrib.sh new file mode 100755 index 000000000..ec1415794 --- /dev/null +++ b/.github/scripts/contrib.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +set -e + +headAuthor=$(git log -1 --pretty=format:'%ae') +git log --pretty=format:'%ae' CONTRIBUTORS | grep -q "$headAuthor" + +echo "$headAuthor found in CONTRIBUTORS" diff --git a/.github/workflows/contrib.yml b/.github/workflows/contrib.yml index 45bb0f646..b49f18b9f 100644 --- a/.github/workflows/contrib.yml +++ b/.github/workflows/contrib.yml @@ -9,5 +9,4 @@ jobs: - uses: actions/checkout@v2 - name: Check run: | - headAuthor=$(git log -1 --pretty=format:'%ae') - git log --pretty=format:'%ae' CONTRIBUTORS | grep -q "$headAuthor" + .github/scripts/contrib.sh