diff options
Diffstat (limited to '.github/workflows/cla.yml')
-rw-r--r-- | .github/workflows/cla.yml | 17 |
1 files changed, 14 insertions, 3 deletions
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 |