summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/cla.yml17
-rw-r--r--tools/.github-cla-signers1
2 files changed, 15 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
diff --git a/tools/.github-cla-signers b/tools/.github-cla-signers
new file mode 100644
index 00000000..48ac33e4
--- /dev/null
+++ b/tools/.github-cla-signers
@@ -0,0 +1 @@
+dhensby