From a8ef147b6141e480a309bdf27b6e0cac4f26ab18 Mon Sep 17 00:00:00 2001 From: Daniel Watkins Date: Wed, 11 Mar 2020 10:33:57 -0400 Subject: Introduce and use of a list of GitHub usernames that have signed CLA (#244) The list so far is partial. --- .github/workflows/cla.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index 389eccb8..8a0b2c07 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -24,6 +24,17 @@ jobs: Thanks, Your friendly cloud-init upstream EOF - grep -q ': \"${{ github.event.pull_request.user.login }}\"' ./tools/.lp-to-git-user && \ - echo "Thanks ${{ github.event.pull_request.user.login }} for signing cloud-init's CLA" || \ - (cat unsigned-cla.txt && exit 1) + + has_signed() { + username="$1" + grep -q ": \"$username\"" ./tools/.lp-to-git-user && return 0 + grep -q "^$username$" ./tools/.github-cla-signers && return 0 + return 1 + } + + if has_signed "${{ github.event.pull_request.user.login }}"; then + echo "Thanks ${{ github.event.pull_request.user.login }} for signing cloud-init's CLA" + else + cat unsigned-cla.txt + exit 1 + fi -- cgit v1.2.3